home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / games / gomoku.elc.z / gomoku.elc
Emacs Compiled Lisp  |  1998-05-21  |  22.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs/XEmacs v20 byte-compiled Lisp data default
99% file data default
55% TrID Emacs/XEmacs byte-compiled Lisp (generic) default
44% TrID Summation Document Image Information Load File default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 14 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 6a 75 73 74 69 6e 62 |piled by| justinb|
|00000020| 40 65 62 6f 6e 79 2e 63 | 72 61 79 2e 63 6f 6d 20 |@ebony.c|ray.com |
|00000030| 6f 6e 20 4d 6f 6e 20 4d | 61 72 20 20 39 20 31 32 |on Mon M|ar 9 12|
|00000040| 3a 34 39 3a 33 32 20 31 | 39 39 38 0a 3b 3b 3b 20 |:49:32 1|998.;;; |
|00000050| 66 72 6f 6d 20 66 69 6c | 65 20 2f 68 6f 6d 65 2f |from fil|e /home/|
|00000060| 61 73 70 65 6e 30 37 2f | 6a 75 73 74 69 6e 62 2f |aspen07/|justinb/|
|00000070| 72 6f 6f 74 73 2f 66 72 | 65 65 77 61 72 65 2f 78 |roots/fr|eeware/x|
|00000080| 65 6d 61 63 73 2f 32 30 | 2e 33 2f 78 65 6d 61 63 |emacs/20|.3/xemac|
|00000090| 73 2d 32 30 2e 33 2f 6c | 69 73 70 2f 67 61 6d 65 |s-20.3/l|isp/game|
|000000a0| 73 2f 67 6f 6d 6f 6b 75 | 2e 65 6c 0a 3b 3b 3b 20 |s/gomoku|.el.;;; |
|000000b0| 65 6d 61 63 73 20 76 65 | 72 73 69 6f 6e 20 32 30 |emacs ve|rsion 20|
|000000c0| 2e 34 20 22 45 6d 65 72 | 61 6c 64 22 20 58 45 6d |.4 "Emer|ald" XEm|
|000000d0| 61 63 73 20 20 4c 75 63 | 69 64 2e 0a 3b 3b 3b 20 |acs Luc|id..;;; |
|000000e0| 62 79 74 65 63 6f 6d 70 | 20 76 65 72 73 69 6f 6e |bytecomp| version|
|000000f0| 20 32 2e 32 35 20 58 45 | 6d 61 63 73 3b 20 32 32 | 2.25 XE|macs; 22|
|00000100| 2d 4d 61 72 2d 39 36 2e | 0a 3b 3b 3b 20 6f 70 74 |-Mar-96.|.;;; opt|
|00000110| 69 6d 69 7a 61 74 69 6f | 6e 20 69 73 20 6f 6e 2e |imizatio|n is on.|
|00000120| 0a 3b 3b 3b 20 74 68 69 | 73 20 66 69 6c 65 20 75 |.;;; thi|s file u|
|00000130| 73 65 73 20 6f 70 63 6f | 64 65 73 20 77 68 69 63 |ses opco|des whic|
|00000140| 68 20 64 6f 20 6e 6f 74 | 20 65 78 69 73 74 20 69 |h do not| exist i|
|00000150| 6e 20 45 6d 61 63 73 20 | 31 39 2e 0a 0a 28 69 66 |n Emacs |19...(if|
|00000160| 20 28 61 6e 64 20 28 62 | 6f 75 6e 64 70 20 27 65 | (and (b|oundp 'e|
|00000170| 6d 61 63 73 2d 76 65 72 | 73 69 6f 6e 29 0a 09 20 |macs-ver|sion).. |
|00000180| 28 6f 72 20 28 61 6e 64 | 20 28 62 6f 75 6e 64 70 |(or (and| (boundp|
|00000190| 20 27 65 70 6f 63 68 3a | 3a 76 65 72 73 69 6f 6e | 'epoch:|:version|
|000001a0| 29 20 65 70 6f 63 68 3a | 3a 76 65 72 73 69 6f 6e |) epoch:|:version|
|000001b0| 29 0a 09 20 20 20 20 20 | 28 73 74 72 69 6e 67 2d |).. |(string-|
|000001c0| 6c 65 73 73 70 20 65 6d | 61 63 73 2d 76 65 72 73 |lessp em|acs-vers|
|000001d0| 69 6f 6e 20 22 32 30 22 | 29 29 29 0a 20 20 20 20 |ion "20"|))). |
|000001e0| 28 65 72 72 6f 72 20 22 | 60 67 6f 6d 6f 6b 75 2e |(error "|`gomoku.|
|000001f0| 65 6c 27 20 77 61 73 20 | 63 6f 6d 70 69 6c 65 64 |el' was |compiled|
|00000200| 20 66 6f 72 20 45 6d 61 | 63 73 20 32 30 22 29 29 | for Ema|cs 20"))|
|00000210| 0a 0a 28 6f 72 20 28 62 | 6f 75 6e 64 70 20 27 63 |..(or (b|oundp 'c|
|00000220| 75 72 72 65 6e 74 2d 6c | 6f 61 64 2d 6c 69 73 74 |urrent-l|oad-list|
|00000230| 29 20 28 73 65 74 71 20 | 63 75 72 72 65 6e 74 2d |) (setq |current-|
|00000240| 6c 6f 61 64 2d 6c 69 73 | 74 20 6e 69 6c 29 29 0a |load-lis|t nil)).|
|00000250| 0a 0a 23 40 35 38 20 49 | 66 20 6e 6f 6e 2d 6e 69 |..#@58 I|f non-ni|
|00000260| 6c 2c 20 69 74 73 20 76 | 61 6c 75 65 20 69 73 20 |l, its v|alue is |
|00000270| 63 61 6c 6c 65 64 20 6f | 6e 20 65 6e 74 72 79 20 |called o|n entry |
|00000280| 74 6f 20 47 6f 6d 6f 6b | 75 20 6d 6f 64 65 2e 1f |to Gomok|u mode..|
|00000290| 0a 28 64 65 66 76 61 72 | 20 67 6f 6d 6f 6b 75 2d |.(defvar| gomoku-|
|000002a0| 6d 6f 64 65 2d 68 6f 6f | 6b 20 6e 69 6c 20 28 23 |mode-hoo|k nil (#|
|000002b0| 24 20 2e 20 35 39 39 29 | 29 0a 23 40 33 37 20 4c |$ . 599)|).#@37 L|
|000002c0| 6f 63 61 6c 20 6b 65 79 | 6d 61 70 20 74 6f 20 75 |ocal key|map to u|
|000002d0| 73 65 20 69 6e 20 47 6f | 6d 6f 6b 75 20 6d 6f 64 |se in Go|moku mod|
|000002e0| 65 2e 1f 0a 28 64 65 66 | 76 61 72 20 67 6f 6d 6f |e...(def|var gomo|
|000002f0| 6b 75 2d 6d 6f 64 65 2d | 6d 61 70 20 6e 69 6c 20 |ku-mode-|map nil |
|00000300| 28 23 24 20 2e 20 37 30 | 33 29 29 0a 28 62 79 74 |(#$ . 70|3)).(byt|
|00000310| 65 2d 63 6f 64 65 20 22 | 08 84 a8 00 c1 20 10 c2 |e-code "|..... ..|
|00000320| 08 c0 5c 22 88 c3 08 c4 | c5 23 88 c3 08 c6 c7 23 |..\"....|.#.....#|
|00000330| 88 c3 08 c8 c9 23 88 c3 | 08 ca cb 23 88 c3 08 cc |.....#..|...#....|
|00000340| cd 23 88 c3 08 ce cf 23 | 88 c3 08 d0 d1 23 88 c3 |.#.....#|.....#..|
|00000350| 08 d2 d3 23 88 c3 08 d4 | d1 23 88 c3 08 d5 d3 23 |...#....|.#.....#|
|00000360| 88 c3 08 d6 cf 23 88 c3 | 08 d7 cd 23 88 c3 08 d8 |.....#..|...#....|
|00000370| d9 23 88 c3 08 da d9 23 | 88 c3 08 db d9 23 88 c3 |.#.....#|.....#..|
|00000380| 08 dc d9 23 88 c3 08 dd | de 23 88 c3 08 df e0 23 |...#....|.#.....#|
|00000390| 88 c3 08 e1 e2 23 88 c3 | 08 e3 d3 23 88 c3 08 e4 |.....#..|...#....|
|000003a0| d1 23 88 c3 08 e5 cd 23 | 88 c3 08 e6 cf 23 88 c3 |.#.....#|.....#..|
|000003b0| 08 e7 d9 23 88 c3 08 e8 | e9 23 88 c3 08 ea d9 23 |...#....|.#.....#|
|000003c0| 88 c1 87 22 20 5b 67 6f | 6d 6f 6b 75 2d 6d 6f 64 |..." [go|moku-mod|
|000003d0| 65 2d 6d 61 70 20 6d 61 | 6b 65 2d 73 70 61 72 73 |e-map ma|ke-spars|
|000003e0| 65 2d 6b 65 79 6d 61 70 | 20 73 65 74 2d 6b 65 79 |e-keymap| set-key|
|000003f0| 6d 61 70 2d 6e 61 6d 65 | 20 64 65 66 69 6e 65 2d |map-name| define-|
|00000400| 6b 65 79 20 22 79 22 20 | 67 6f 6d 6f 6b 75 2d 6d |key "y" |gomoku-m|
|00000410| 6f 76 65 2d 6e 77 20 22 | 75 22 20 67 6f 6d 6f 6b |ove-nw "|u" gomok|
|00000420| 75 2d 6d 6f 76 65 2d 6e | 65 20 22 62 22 20 67 6f |u-move-n|e "b" go|
|00000430| 6d 6f 6b 75 2d 6d 6f 76 | 65 2d 73 77 20 22 6e 22 |moku-mov|e-sw "n"|
|00000440| 20 67 6f 6d 6f 6b 75 2d | 6d 6f 76 65 2d 73 65 20 | gomoku-|move-se |
|00000450| 22 68 22 20 67 6f 6d 6f | 6b 75 2d 6d 6f 76 65 2d |"h" gomo|ku-move-|
|00000460| 6c 65 66 74 20 22 6c 22 | 20 67 6f 6d 6f 6b 75 2d |left "l"| gomoku-|
|00000470| 6d 6f 76 65 2d 72 69 67 | 68 74 20 22 6a 22 20 67 |move-rig|ht "j" g|
|00000480| 6f 6d 6f 6b 75 2d 6d 6f | 76 65 2d 64 6f 77 6e 20 |omoku-mo|ve-down |
|00000490| 22 6b 22 20 67 6f 6d 6f | 6b 75 2d 6d 6f 76 65 2d |"k" gomo|ku-move-|
|000004a0| 75 70 20 22 0e 22 20 22 | 10 22 20 22 06 22 20 22 |up "." "|." "." "|
|000004b0| 02 22 20 22 58 22 20 67 | 6f 6d 6f 6b 75 2d 68 75 |." "X" g|omoku-hu|
|000004c0| 6d 61 6e 2d 70 6c 61 79 | 73 20 22 78 22 20 22 0d |man-play|s "x" ".|
|000004d0| 22 20 22 03 10 22 20 22 | 03 02 22 20 67 6f 6d 6f |" ".." "|.." gomo|
|000004e0| 6b 75 2d 68 75 6d 61 6e | 2d 74 61 6b 65 73 2d 62 |ku-human|-takes-b|
|000004f0| 61 63 6b 20 22 03 12 22 | 20 67 6f 6d 6f 6b 75 2d |ack ".."| gomoku-|
|00000500| 68 75 6d 61 6e 2d 72 65 | 73 69 67 6e 73 20 22 03 |human-re|signs ".|
|00000510| 05 22 20 67 6f 6d 6f 6b | 75 2d 65 6d 61 63 73 2d |." gomok|u-emacs-|
|00000520| 70 6c 61 79 73 20 5b 75 | 70 5d 20 5b 64 6f 77 6e |plays [u|p] [down|
|00000530| 5d 20 5b 6c 65 66 74 5d | 20 5b 72 69 67 68 74 5d |] [left]| [right]|
|00000540| 20 5b 6b 70 2d 65 6e 74 | 65 72 5d 20 5b 62 75 74 | [kp-ent|er] [but|
|00000550| 74 6f 6e 32 5d 20 67 6f | 6d 6f 6b 75 2d 63 6c 69 |ton2] go|moku-cli|
|00000560| 63 6b 20 5b 69 6e 73 65 | 72 74 5d 5d 20 34 29 0a |ck [inse|rt]] 4).|
|00000570| 23 40 34 35 36 20 4d 61 | 6a 6f 72 20 6d 6f 64 65 |#@456 Ma|jor mode|
|00000580| 20 66 6f 72 20 70 6c 61 | 79 69 6e 67 20 47 6f 6d | for pla|ying Gom|
|00000590| 6f 6b 75 20 61 67 61 69 | 6e 73 74 20 45 6d 61 63 |oku agai|nst Emac|
|000005a0| 73 2e 0a 59 6f 75 20 61 | 6e 64 20 45 6d 61 63 73 |s..You a|nd Emacs|
|000005b0| 20 70 6c 61 79 20 69 6e | 20 74 75 72 6e 20 62 79 | play in| turn by|
|000005c0| 20 6d 61 72 6b 69 6e 67 | 20 61 20 66 72 65 65 20 | marking| a free |
|000005d0| 73 71 75 61 72 65 2e 20 | 59 6f 75 20 6d 61 72 6b |square. |You mark|
|000005e0| 20 69 74 20 77 69 74 68 | 20 58 0a 61 6e 64 20 45 | it with| X.and E|
|000005f0| 6d 61 63 73 20 6d 61 72 | 6b 73 20 69 74 20 77 69 |macs mar|ks it wi|
|00000600| 74 68 20 4f 2e 20 54 68 | 65 20 77 69 6e 6e 65 72 |th O. Th|e winner|
|00000610| 20 69 73 20 74 68 65 20 | 66 69 72 73 74 20 74 6f | is the |first to|
|00000620| 20 67 65 74 20 66 69 76 | 65 20 63 6f 6e 74 69 67 | get fiv|e contig|
|00000630| 75 6f 75 73 0a 6d 61 72 | 6b 73 20 68 6f 72 69 7a |uous.mar|ks horiz|
|00000640| 6f 6e 74 61 6c 6c 79 2c | 20 76 65 72 74 69 63 61 |ontally,| vertica|
|00000650| 6c 6c 79 20 6f 72 20 69 | 6e 20 64 69 61 67 6f 6e |lly or i|n diagon|
|00000660| 61 6c 2e 0a 59 6f 75 20 | 70 6c 61 79 20 62 79 20 |al..You |play by |
|00000670| 6d 6f 76 69 6e 67 20 74 | 68 65 20 63 75 72 73 6f |moving t|he curso|
|00000680| 72 20 6f 76 65 72 20 74 | 68 65 20 73 71 75 61 72 |r over t|he squar|
|00000690| 65 20 79 6f 75 20 63 68 | 6f 6f 73 65 20 61 6e 64 |e you ch|oose and|
|000006a0| 20 68 69 74 74 69 6e 67 | 20 5c 5b 67 6f 6d 6f 6b | hitting| \[gomok|
|000006b0| 75 2d 68 75 6d 61 6e 2d | 70 6c 61 79 73 5d 2e 0a |u-human-|plays]..|
|000006c0| 4f 74 68 65 72 20 75 73 | 65 66 75 6c 20 63 6f 6d |Other us|eful com|
|000006d0| 6d 61 6e 64 73 3a 0a 5c | 7b 67 6f 6d 6f 6b 75 2d |mands:.\|{gomoku-|
|000006e0| 6d 6f 64 65 2d 6d 61 70 | 7d 0a 45 6e 74 72 79 20 |mode-map|}.Entry |
|000006f0| 74 6f 20 74 68 69 73 20 | 6d 6f 64 65 20 63 61 6c |to this |mode cal|
|00000700| 6c 73 20 74 68 65 20 76 | 61 6c 75 65 20 6f 66 20 |ls the v|alue of |
|00000710| 60 67 6f 6d 6f 6b 75 2d | 6d 6f 64 65 2d 68 6f 6f |`gomoku-|mode-hoo|
|00000720| 6b 27 20 69 66 20 74 68 | 61 74 20 76 61 6c 75 65 |k' if th|at value|
|00000730| 0a 69 73 20 6e 6f 6e 2d | 6e 69 6c 2e 1f 0a 28 64 |.is non-|nil...(d|
|00000740| 65 66 61 6c 69 61 73 20 | 27 67 6f 6d 6f 6b 75 2d |efalias |'gomoku-|
|00000750| 6d 6f 64 65 20 23 5b 6e | 69 6c 20 22 c0 11 c2 13 |mode #[n|il "....|
|00000760| c4 20 88 c5 0e 06 21 88 | c7 c8 21 87 22 20 5b 67 |. ....!.|..!." [g|
|00000770| 6f 6d 6f 6b 75 2d 6d 6f | 64 65 20 6d 61 6a 6f 72 |omoku-mo|de major|
|00000780| 2d 6d 6f 64 65 20 22 47 | 6f 6d 6f 6b 75 22 20 6d |-mode "G|omoku" m|
|00000790| 6f 64 65 2d 6e 61 6d 65 | 20 67 6f 6d 6f 6b 75 2d |ode-name| gomoku-|
|000007a0| 64 69 73 70 6c 61 79 2d | 73 74 61 74 69 73 74 69 |display-|statisti|
|000007b0| 63 73 20 75 73 65 2d 6c | 6f 63 61 6c 2d 6d 61 70 |cs use-l|ocal-map|
|000007c0| 20 67 6f 6d 6f 6b 75 2d | 6d 6f 64 65 2d 6d 61 70 | gomoku-|mode-map|
|000007d0| 20 72 75 6e 2d 68 6f 6f | 6b 73 20 67 6f 6d 6f 6b | run-hoo|ks gomok|
|000007e0| 75 2d 6d 6f 64 65 2d 68 | 6f 6f 6b 5d 20 32 20 28 |u-mode-h|ook] 2 (|
|000007f0| 23 24 20 2e 20 31 33 39 | 38 29 20 6e 69 6c 5d 29 |#$ . 139|8) nil])|
|00000800| 0a 23 40 34 30 20 4e 75 | 6d 62 65 72 20 6f 66 20 |.#@40 Nu|mber of |
|00000810| 63 6f 6c 75 6d 6e 73 20 | 6f 6e 20 74 68 65 20 47 |columns |on the G|
|00000820| 6f 6d 6f 6b 75 20 62 6f | 61 72 64 2e 1f 0a 28 64 |omoku bo|ard...(d|
|00000830| 65 66 76 61 72 20 67 6f | 6d 6f 6b 75 2d 62 6f 61 |efvar go|moku-boa|
|00000840| 72 64 2d 77 69 64 74 68 | 20 6e 69 6c 20 28 23 24 |rd-width| nil (#$|
|00000850| 20 2e 20 32 30 35 34 29 | 29 0a 23 40 33 38 20 4e | . 2054)|).#@38 N|
|00000860| 75 6d 62 65 72 20 6f 66 | 20 6c 69 6e 65 73 20 6f |umber of| lines o|
|00000870| 6e 20 74 68 65 20 47 6f | 6d 6f 6b 75 20 62 6f 61 |n the Go|moku boa|
|00000880| 72 64 2e 1f 0a 28 64 65 | 66 76 61 72 20 67 6f 6d |rd...(de|fvar gom|
|00000890| 6f 6b 75 2d 62 6f 61 72 | 64 2d 68 65 69 67 68 74 |oku-boar|d-height|
|000008a0| 20 6e 69 6c 20 28 23 24 | 20 2e 20 32 31 34 33 29 | nil (#$| . 2143)|
|000008b0| 29 0a 23 40 35 36 20 56 | 65 63 74 6f 72 20 72 65 |).#@56 V|ector re|
|000008c0| 63 6f 72 64 69 6e 67 20 | 74 68 65 20 61 63 74 75 |cording |the actu|
|000008d0| 61 6c 20 73 74 61 74 65 | 20 6f 66 20 74 68 65 20 |al state| of the |
|000008e0| 47 6f 6d 6f 6b 75 20 62 | 6f 61 72 64 2e 1f 0a 28 |Gomoku b|oard...(|
|000008f0| 64 65 66 76 61 72 20 67 | 6f 6d 6f 6b 75 2d 62 6f |defvar g|omoku-bo|
|00000900| 61 72 64 20 6e 69 6c 20 | 28 23 24 20 2e 20 32 32 |ard nil |(#$ . 22|
|00000910| 33 31 29 29 0a 23 40 33 | 32 20 4c 65 6e 67 74 68 |31)).#@3|2 Length|
|00000920| 20 6f 66 20 67 6f 6d 6f | 6b 75 2d 62 6f 61 72 64 | of gomo|ku-board|
|00000930| 20 76 65 63 74 6f 72 2e | 1f 0a 28 64 65 66 76 61 | vector.|..(defva|
|00000940| 72 20 67 6f 6d 6f 6b 75 | 2d 76 65 63 74 6f 72 2d |r gomoku|-vector-|
|00000950| 6c 65 6e 67 74 68 20 6e | 69 6c 20 28 23 24 20 2e |length n|il (#$ .|
|00000960| 20 32 33 33 30 29 29 0a | 23 40 34 37 20 41 66 74 | 2330)).|#@47 Aft|
|00000970| 65 72 20 68 6f 77 20 6d | 61 6e 79 20 6d 6f 76 65 |er how m|any move|
|00000980| 73 20 77 69 6c 6c 20 45 | 6d 61 63 73 20 6f 66 66 |s will E|macs off|
|00000990| 65 72 20 61 20 64 72 61 | 77 3f 1f 0a 28 64 65 66 |er a dra|w?..(def|
|000009a0| 76 61 72 20 67 6f 6d 6f | 6b 75 2d 64 72 61 77 2d |var gomo|ku-draw-|
|000009b0| 6c 69 6d 69 74 20 6e 69 | 6c 20 28 23 24 20 2e 20 |limit ni|l (#$ . |
|000009c0| 32 34 31 33 29 29 0a 23 | 40 36 39 20 54 72 61 6e |2413)).#|@69 Tran|
|000009d0| 73 6c 61 74 65 20 58 2c | 20 59 20 63 61 72 74 65 |slate X,| Y carte|
|000009e0| 73 69 61 6e 20 63 6f 6f | 72 64 73 20 69 6e 74 6f |sian coo|rds into|
|000009f0| 20 74 68 65 20 63 6f 72 | 72 65 73 70 6f 6e 64 69 | the cor|respondi|
|00000a00| 6e 67 20 62 6f 61 72 64 | 20 69 6e 64 65 78 2e 1f |ng board| index..|
|00000a10| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 67 6f 6d 6f |.(defali|as 'gomo|
|00000a20| 6b 75 2d 78 79 2d 74 6f | 2d 69 6e 64 65 78 20 23 |ku-xy-to|-index #|
|00000a30| 5b 28 78 20 79 29 20 22 | 08 09 5f 5c 6e 5c 5c 08 |[(x y) "|.._\n\\.|
|00000a40| 5c 5c 87 22 20 5b 79 20 | 67 6f 6d 6f 6b 75 2d 62 |\\." [y |gomoku-b|
|00000a50| 6f 61 72 64 2d 77 69 64 | 74 68 20 78 5d 20 32 20 |oard-wid|th x] 2 |
|00000a60| 28 23 24 20 2e 20 32 35 | 30 38 29 5d 29 0a 23 40 |(#$ . 25|08)]).#@|
|00000a70| 34 36 20 52 65 74 75 72 | 6e 20 63 6f 72 72 65 73 |46 Retur|n corres|
|00000a80| 70 6f 6e 64 69 6e 67 20 | 78 2d 63 6f 6f 72 64 20 |ponding |x-coord |
|00000a90| 6f 66 20 62 6f 61 72 64 | 20 49 4e 44 45 58 2e 1f |of board| INDEX..|
|00000aa0| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 67 6f 6d 6f |.(defali|as 'gomo|
|00000ab0| 6b 75 2d 69 6e 64 65 78 | 2d 74 6f 2d 78 20 23 5b |ku-index|-to-x #[|
|00000ac0| 28 69 6e 64 65 78 29 20 | 22 08 09 54 a6 87 22 20 |(index) |"..T.." |
|00000ad0| 5b 69 6e 64 65 78 20 67 | 6f 6d 6f 6b 75 2d 62 6f |[index g|omoku-bo|
|00000ae0| 61 72 64 2d 77 69 64 74 | 68 5d 20 32 20 28 23 24 |ard-widt|h] 2 (#$|
|00000af0| 20 2e 20 32 36 37 35 29 | 5d 29 0a 23 40 34 36 20 | . 2675)|]).#@46 |
|00000b00| 52 65 74 75 72 6e 20 63 | 6f 72 72 65 73 70 6f 6e |Return c|orrespon|
|00000b10| 64 69 6e 67 20 79 2d 63 | 6f 6f 72 64 20 6f 66 20 |ding y-c|oord of |
|00000b20| 62 6f 61 72 64 20 49 4e | 44 45 58 2e 1f 0a 28 64 |board IN|DEX...(d|
|00000b30| 65 66 61 6c 69 61 73 20 | 27 67 6f 6d 6f 6b 75 2d |efalias |'gomoku-|
|00000b40| 69 6e 64 65 78 2d 74 6f | 2d 79 20 23 5b 28 69 6e |index-to|-y #[(in|
|00000b50| 64 65 78 29 20 22 08 09 | 54 a5 87 22 20 5b 69 6e |dex) "..|T.." [in|
|00000b60| 64 65 78 20 67 6f 6d 6f | 6b 75 2d 62 6f 61 72 64 |dex gomo|ku-board|
|00000b70| 2d 77 69 64 74 68 5d 20 | 32 20 28 23 24 20 2e 20 |-width] |2 (#$ . |
|00000b80| 32 38 31 36 29 5d 29 0a | 23 40 36 35 20 43 72 65 |2816)]).|#@65 Cre|
|00000b90| 61 74 65 20 74 68 65 20 | 67 6f 6d 6f 6b 75 2d 62 |ate the |gomoku-b|
|00000ba0| 6f 61 72 64 20 76 65 63 | 74 6f 72 20 61 6e 64 20 |oard vec|tor and |
|00000bb0| 66 69 6c 6c 20 69 74 20 | 77 69 74 68 20 69 6e 69 |fill it |with ini|
|00000bc0| 74 69 61 6c 20 76 61 6c | 75 65 73 2e 1f 0a 28 64 |tial val|ues...(d|
|00000bd0| 65 66 61 6c 69 61 73 20 | 27 67 6f 6d 6f 6b 75 2d |efalias |'gomoku-|
|00000be0| 69 6e 69 74 2d 62 6f 61 | 72 64 20 23 5b 6e 69 6c |init-boa|rd #[nil|
|00000bf0| 20 22 c0 09 c2 5c 22 13 | c2 09 53 1c 1d 0d 0e 06 | "...\".|..S.....|
|00000c00| 58 ab 92 0b 0d c7 49 88 | 0b 0c c7 49 88 0d 54 15 |X.....I.|...I..T.|
|00000c10| 0c 53 14 aa 68 2a c2 1d | c2 09 57 ad 8f 0b 0d c7 |.S..h*..|..W.....|
|00000c20| 49 88 0d 0e 06 5c 5c c8 | 5c 5c 89 15 aa 6d 29 87 |I....\\.|\\...m).|
|00000c30| 22 20 5b 6d 61 6b 65 2d | 76 65 63 74 6f 72 20 67 |" [make-|vector g|
|00000c40| 6f 6d 6f 6b 75 2d 76 65 | 63 74 6f 72 2d 6c 65 6e |omoku-ve|ctor-len|
|00000c50| 67 74 68 20 30 20 67 6f | 6d 6f 6b 75 2d 62 6f 61 |gth 0 go|moku-boa|
|00000c60| 72 64 20 69 69 20 69 20 | 67 6f 6d 6f 6b 75 2d 62 |rd ii i |gomoku-b|
|00000c70| 6f 61 72 64 2d 77 69 64 | 74 68 20 2d 31 20 31 5d |oard-wid|th -1 1]|
|00000c80| 20 34 20 28 23 24 20 2e | 20 32 39 35 37 29 5d 29 | 4 (#$ .| 2957)])|
|00000c90| 0a 23 40 35 36 20 56 65 | 63 74 6f 72 20 72 65 63 |.#@56 Ve|ctor rec|
|00000ca0| 6f 72 64 69 6e 67 20 74 | 68 65 20 61 63 74 75 61 |ording t|he actua|
|00000cb0| 6c 20 73 63 6f 72 65 20 | 6f 66 20 74 68 65 20 66 |l score |of the f|
|00000cc0| 72 65 65 20 73 71 75 61 | 72 65 73 2e 1f 0a 28 64 |ree squa|res...(d|
|00000cd0| 65 66 76 61 72 20 67 6f | 6d 6f 6b 75 2d 73 63 6f |efvar go|moku-sco|
|00000ce0| 72 65 2d 74 61 62 6c 65 | 20 6e 69 6c 20 28 23 24 |re-table| nil (#$|
|00000cf0| 20 2e 20 33 32 32 32 29 | 29 0a 23 40 32 37 20 53 | . 3222)|).#@27 S|
|00000d00| 63 6f 72 65 20 6f 66 20 | 61 6e 20 65 6d 70 74 79 |core of |an empty|
|00000d10| 20 71 74 75 70 6c 65 2e | 1f 0a 28 64 65 66 63 6f | qtuple.|..(defco|
|00000d20| 6e 73 74 20 6e 69 6c 2d | 73 63 6f 72 65 20 37 20 |nst nil-|score 7 |
|00000d30| 28 23 24 20 2e 20 33 33 | 32 37 29 29 0a 23 40 33 |(#$ . 33|27)).#@3|
|00000d40| 37 20 53 63 6f 72 65 20 | 6f 66 20 61 20 71 74 75 |7 Score |of a qtu|
|00000d50| 70 6c 65 20 63 6f 6e 74 | 61 69 6e 69 6e 67 20 6f |ple cont|aining o|
|00000d60| 6e 65 20 58 2e 1f 0a 28 | 64 65 66 63 6f 6e 73 74 |ne X...(|defconst|
|00000d70| 20 58 73 63 6f 72 65 20 | 31 35 20 28 23 24 20 2e | Xscore |15 (#$ .|
|00000d80| 20 33 33 39 34 29 29 0a | 23 40 33 39 20 53 63 6f | 3394)).|#@39 Sco|
|00000d90| 72 65 20 6f 66 20 61 20 | 71 74 75 70 6c 65 20 63 |re of a |qtuple c|
|00000da0| 6f 6e 74 61 69 6e 69 6e | 67 20 74 77 6f 20 58 27 |ontainin|g two X'|
|00000db0| 73 2e 1f 0a 28 64 65 66 | 63 6f 6e 73 74 20 58 58 |s...(def|const XX|
|00000dc0| 73 63 6f 72 65 20 34 30 | 30 20 28 23 24 20 2e 20 |score 40|0 (#$ . |
|00000dd0| 33 34 36 39 29 29 0a 23 | 40 34 31 20 53 63 6f 72 |3469)).#|@41 Scor|
|00000de0| 65 20 6f 66 20 61 20 71 | 74 75 70 6c 65 20 63 6f |e of a q|tuple co|
|00000df0| 6e 74 61 69 6e 69 6e 67 | 20 74 68 72 65 65 20 58 |ntaining| three X|
|00000e00| 27 73 2e 1f 0a 28 64 65 | 66 63 6f 6e 73 74 20 58 |'s...(de|fconst X|
|00000e10| 58 58 73 63 6f 72 65 20 | 31 38 30 30 20 28 23 24 |XXscore |1800 (#$|
|00000e20| 20 2e 20 33 35 34 38 29 | 29 0a 23 40 34 30 20 53 | . 3548)|).#@40 S|
|00000e30| 63 6f 72 65 20 6f 66 20 | 61 20 71 74 75 70 6c 65 |core of |a qtuple|
|00000e40| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 66 6f 75 72 | contain|ing four|
|00000e50| 20 58 27 73 2e 1f 0a 28 | 64 65 66 63 6f 6e 73 74 | X's...(|defconst|
|00000e60| 20 58 58 58 58 73 63 6f | 72 65 20 31 30 30 30 30 | XXXXsco|re 10000|
|00000e70| 30 20 28 23 24 20 2e 20 | 33 36 33 31 29 29 0a 23 |0 (#$ . |3631)).#|
|00000e80| 40 33 37 20 53 63 6f 72 | 65 20 6f 66 20 61 20 71 |@37 Scor|e of a q|
|00000e90| 74 75 70 6c 65 20 63 6f | 6e 74 61 69 6e 69 6e 67 |tuple co|ntaining|
|00000ea0| 20 6f 6e 65 20 4f 2e 1f | 0a 28 64 65 66 63 6f 6e | one O..|.(defcon|
|00000eb0| 73 74 20 4f 73 63 6f 72 | 65 20 33 35 20 28 23 24 |st Oscor|e 35 (#$|
|00000ec0| 20 2e 20 33 37 31 36 29 | 29 0a 23 40 33 39 20 53 | . 3716)|).#@39 S|
|00000ed0| 63 6f 72 65 20 6f 66 20 | 61 20 71 74 75 70 6c 65 |core of |a qtuple|
|00000ee0| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 74 77 6f 20 | contain|ing two |
|00000ef0| 4f 27 73 2e 1f 0a 28 64 | 65 66 63 6f 6e 73 74 20 |O's...(d|efconst |
|00000f00| 4f 4f 73 63 6f 72 65 20 | 38 30 30 20 28 23 24 20 |OOscore |800 (#$ |
|00000f10| 2e 20 33 37 39 31 29 29 | 0a 23 40 34 31 20 53 63 |. 3791))|.#@41 Sc|
|00000f20| 6f 72 65 20 6f 66 20 61 | 20 71 74 75 70 6c 65 20 |ore of a| qtuple |
|00000f30| 63 6f 6e 74 61 69 6e 69 | 6e 67 20 74 68 72 65 65 |containi|ng three|
|00000f40| 20 4f 27 73 2e 1f 0a 28 | 64 65 66 63 6f 6e 73 74 | O's...(|defconst|
|00000f50| 20 4f 4f 4f 73 63 6f 72 | 65 20 31 35 30 30 30 20 | OOOscor|e 15000 |
|00000f60| 28 23 24 20 2e 20 33 38 | 37 30 29 29 0a 23 40 34 |(#$ . 38|70)).#@4|
|00000f70| 30 20 53 63 6f 72 65 20 | 6f 66 20 61 20 71 74 75 |0 Score |of a qtu|
|00000f80| 70 6c 65 20 63 6f 6e 74 | 61 69 6e 69 6e 67 20 66 |ple cont|aining f|
|00000f90| 6f 75 72 20 4f 27 73 2e | 1f 0a 28 64 65 66 63 6f |our O's.|..(defco|
|00000fa0| 6e 73 74 20 4f 4f 4f 4f | 73 63 6f 72 65 20 38 30 |nst OOOO|score 80|
|00000fb0| 30 30 30 30 20 28 23 24 | 20 2e 20 33 39 35 34 29 |0000 (#$| . 3954)|
|00000fc0| 29 0a 23 40 35 32 20 56 | 65 63 74 6f 72 20 61 73 |).#@52 V|ector as|
|00000fd0| 73 6f 63 69 61 74 69 6e | 67 20 71 74 75 70 6c 65 |sociatin|g qtuple|
|00000fe0| 20 63 6f 6e 74 65 6e 74 | 73 20 74 6f 20 74 68 65 | content|s to the|
|00000ff0| 69 72 20 73 63 6f 72 65 | 2e 1f 0a 28 64 65 66 63 |ir score|...(defc|
|00001000| 6f 6e 73 74 20 67 6f 6d | 6f 6b 75 2d 73 63 6f 72 |onst gom|oku-scor|
|00001010| 65 2d 74 72 61 6e 73 2d | 74 61 62 6c 65 20 28 62 |e-trans-|table (b|
|00001020| 79 74 65 2d 63 6f 64 65 | 20 22 c0 09 5c 6e 0b 0c |yte-code| "..\n..|
|00001030| 0d c6 0e 07 c6 89 89 89 | 89 0e 08 c6 89 89 89 89 |........|........|
|00001040| 0e 09 c6 89 89 89 89 0e | 5c 6e c6 89 89 89 89 89 |........|\n......|
|00001050| 26 1f 87 22 20 5b 76 65 | 63 74 6f 72 20 6e 69 6c |&.." [ve|ctor nil|
|00001060| 2d 73 63 6f 72 65 20 58 | 73 63 6f 72 65 20 58 58 |-score X|score XX|
|00001070| 73 63 6f 72 65 20 58 58 | 58 73 63 6f 72 65 20 58 |score XX|Xscore X|
|00001080| 58 58 58 73 63 6f 72 65 | 20 30 20 4f 73 63 6f 72 |XXXscore| 0 Oscor|
|00001090| 65 20 4f 4f 73 63 6f 72 | 65 20 4f 4f 4f 73 63 6f |e OOscor|e OOOsco|
|000010a0| 72 65 20 4f 4f 4f 4f 73 | 63 6f 72 65 5d 20 33 32 |re OOOOs|core] 32|
|000010b0| 29 20 28 23 24 20 2e 20 | 34 30 33 39 29 29 0a 23 |) (#$ . |4039)).#|
|000010c0| 40 35 36 20 54 68 72 65 | 73 68 6f 6c 64 20 73 63 |@56 Thre|shold sc|
|000010d0| 6f 72 65 20 62 65 79 6f | 6e 64 20 77 68 69 63 68 |ore beyo|nd which|
|000010e0| 20 61 6e 20 45 6d 61 63 | 73 20 6d 6f 76 65 20 69 | an Emac|s move i|
|000010f0| 73 20 77 69 6e 6e 69 6e | 67 2e 1f 0a 28 64 65 66 |s winnin|g...(def|
|00001100| 63 6f 6e 73 74 20 67 6f | 6d 6f 6b 75 2d 77 69 6e |const go|moku-win|
|00001110| 6e 69 6e 67 2d 74 68 72 | 65 73 68 6f 6c 64 20 4f |ning-thr|eshold O|
|00001120| 4f 4f 4f 73 63 6f 72 65 | 20 28 23 24 20 2e 20 34 |OOOscore| (#$ . 4|
|00001130| 32 39 32 29 29 0a 23 40 | 35 35 20 54 68 72 65 73 |292)).#@|55 Thres|
|00001140| 68 6f 6c 64 20 73 63 6f | 72 65 20 62 65 79 6f 6e |hold sco|re beyon|
|00001150| 64 20 77 68 69 63 68 20 | 61 20 68 75 6d 61 6e 20 |d which |a human |
|00001160| 6d 6f 76 65 20 69 73 20 | 77 69 6e 6e 69 6e 67 2e |move is |winning.|
|00001170| 1f 0a 28 64 65 66 63 6f | 6e 73 74 20 67 6f 6d 6f |..(defco|nst gomo|
|00001180| 6b 75 2d 6c 6f 6f 73 69 | 6e 67 2d 74 68 72 65 73 |ku-loosi|ng-thres|
|00001190| 68 6f 6c 64 20 58 58 58 | 58 73 63 6f 72 65 20 28 |hold XXX|Xscore (|
|000011a0| 23 24 20 2e 20 34 34 31 | 31 29 29 0a 23 40 36 36 |#$ . 441|1)).#@66|
|000011b0| 20 43 6f 6d 70 75 74 65 | 20 69 6e 64 65 78 20 6f | Compute| index o|
|000011c0| 66 20 66 72 65 65 20 73 | 71 75 61 72 65 20 77 69 |f free s|quare wi|
|000011d0| 74 68 20 68 69 67 68 65 | 73 74 20 73 63 6f 72 65 |th highe|st score|
|000011e0| 2c 20 6f 72 20 6e 69 6c | 20 69 66 20 6e 6f 6e 65 |, or nil| if none|
|000011f0| 2e 1f 0a 28 64 65 66 61 | 6c 69 61 73 20 27 67 6f |...(defa|lias 'go|
|00001200| 6d 6f 6b 75 2d 73 74 72 | 6f 6e 67 65 73 74 2d 73 |moku-str|ongest-s|
|00001210| 71 75 61 72 65 20 23 5b | 6e 69 6c 20 22 c0 89 c1 |quare #[|nil "...|
|00001220| c2 89 5c 22 c1 0b 0c 5c | 22 c5 89 1e 06 1e 07 1e |..\"...\|".......|
|00001230| 08 1e 09 1e 5c 6e 1e 0b | 0e 09 0e 08 58 ab e4 0e |....\n..|....X...|
|00001240| 0c 0e 09 48 0e 0b 57 ac | d2 0e 0c 0e 09 48 89 16 |...H..W.|.....H..|
|00001250| 06 0e 0b 56 ab 9f 0e 0d | 0e 09 48 c0 55 ab 8d c2 |...V....|..H.U...|
|00001260| 16 5c 6e 0e 09 16 07 0e | 06 16 0b aa af 0e 0c 0e |.\n.....|........|
|00001270| 09 ce 49 88 aa a6 0e 0d | 0e 09 48 c0 55 ac 89 0e |..I.....|..H.U...|
|00001280| 0c 0e 09 ce 49 88 aa 94 | cf 0e 5c 6e 54 89 16 5c |....I...|..\nT..\|
|00001290| 6e 21 c0 55 ab 88 0e 09 | 16 07 0e 06 16 0b 0e 09 |n!.U....|........|
|000012a0| 54 89 16 09 aa 17 0e 07 | 2e 06 87 22 20 5b 30 20 |T.......|..." [0 |
|000012b0| 67 6f 6d 6f 6b 75 2d 78 | 79 2d 74 6f 2d 69 6e 64 |gomoku-x|y-to-ind|
|000012c0| 65 78 20 31 20 67 6f 6d | 6f 6b 75 2d 62 6f 61 72 |ex 1 gom|oku-boar|
|000012d0| 64 2d 77 69 64 74 68 20 | 67 6f 6d 6f 6b 75 2d 62 |d-width |gomoku-b|
|000012e0| 6f 61 72 64 2d 68 65 69 | 67 68 74 20 6e 69 6c 20 |oard-hei|ght nil |
|000012f0| 73 63 6f 72 65 20 62 65 | 73 74 2d 73 71 75 61 72 |score be|st-squar|
|00001300| 65 20 65 6e 64 20 73 71 | 75 61 72 65 20 63 6f 75 |e end sq|uare cou|
|00001310| 6e 74 20 73 63 6f 72 65 | 2d 6d 61 78 20 67 6f 6d |nt score|-max gom|
|00001320| 6f 6b 75 2d 73 63 6f 72 | 65 2d 74 61 62 6c 65 20 |oku-scor|e-table |
|00001330| 67 6f 6d 6f 6b 75 2d 62 | 6f 61 72 64 20 2d 31 20 |gomoku-b|oard -1 |
|00001340| 72 61 6e 64 6f 6d 5d 20 | 37 20 28 23 24 20 2e 20 |random] |7 (#$ . |
|00001350| 34 35 32 39 29 5d 29 0a | 23 40 34 39 20 52 65 63 |4529)]).|#@49 Rec|
|00001360| 6f 72 64 65 64 20 69 6e | 69 74 69 61 6c 20 76 61 |orded in|itial va|
|00001370| 6c 75 65 20 6f 66 20 70 | 72 65 76 69 6f 75 73 20 |lue of p|revious |
|00001380| 73 63 6f 72 65 20 74 61 | 62 6c 65 2e 1f 0a 28 64 |score ta|ble...(d|
|00001390| 65 66 76 61 72 20 67 6f | 6d 6f 6b 75 2d 73 61 76 |efvar go|moku-sav|
|000013a0| 65 64 2d 73 63 6f 72 65 | 2d 74 61 62 6c 65 20 6e |ed-score|-table n|
|000013b0| 69 6c 20 28 23 24 20 2e | 20 34 39 35 37 29 29 0a |il (#$ .| 4957)).|
|000013c0| 23 40 34 31 20 52 65 63 | 6f 72 64 65 64 20 76 61 |#@41 Rec|orded va|
|000013d0| 6c 75 65 20 6f 66 20 70 | 72 65 76 69 6f 75 73 20 |lue of p|revious |
|000013e0| 62 6f 61 72 64 20 77 69 | 64 74 68 2e 1f 0a 28 64 |board wi|dth...(d|
|000013f0| 65 66 76 61 72 20 67 6f | 6d 6f 6b 75 2d 73 61 76 |efvar go|moku-sav|
|00001400| 65 64 2d 62 6f 61 72 64 | 2d 77 69 64 74 68 20 6e |ed-board|-width n|
|00001410| 69 6c 20 28 23 24 20 2e | 20 35 30 36 31 29 29 0a |il (#$ .| 5061)).|
|00001420| 23 40 34 32 20 52 65 63 | 6f 72 64 65 64 20 76 61 |#@42 Rec|orded va|
|00001430| 6c 75 65 20 6f 66 20 70 | 72 65 76 69 6f 75 73 20 |lue of p|revious |
|00001440| 62 6f 61 72 64 20 68 65 | 69 67 68 74 2e 1f 0a 28 |board he|ight...(|
|00001450| 64 65 66 76 61 72 20 67 | 6f 6d 6f 6b 75 2d 73 61 |defvar g|omoku-sa|
|00001460| 76 65 64 2d 62 6f 61 72 | 64 2d 68 65 69 67 68 74 |ved-boar|d-height|
|00001470| 20 6e 69 6c 20 28 23 24 | 20 2e 20 35 31 35 37 29 | nil (#$| . 5157)|
|00001480| 29 0a 23 40 36 34 20 43 | 72 65 61 74 65 20 74 68 |).#@64 C|reate th|
|00001490| 65 20 73 63 6f 72 65 20 | 74 61 62 6c 65 20 76 65 |e score |table ve|
|000014a0| 63 74 6f 72 20 61 6e 64 | 20 66 69 6c 6c 20 69 74 |ctor and| fill it|
|000014b0| 20 77 69 74 68 20 69 6e | 69 74 69 61 6c 20 76 61 | with in|itial va|
|000014c0| 6c 75 65 73 2e 1f 0a 28 | 64 65 66 61 6c 69 61 73 |lues...(|defalias|
|000014d0| 20 27 67 6f 6d 6f 6b 75 | 2d 69 6e 69 74 2d 73 63 | 'gomoku|-init-sc|
|000014e0| 6f 72 65 2d 74 61 62 6c | 65 20 23 5b 6e 69 6c 20 |ore-tabl|e #[nil |
|000014f0| 22 08 ab 91 09 5c 6e 55 | ab 8c 0b 0c 55 ab 87 c5 |"....\nU|....U...|
|00001500| 08 21 89 16 06 87 c7 0e | 08 0e 09 ca 5f 5c 22 16 |.!......|...._\".|
|00001510| 06 cb 89 89 89 89 89 1e | 0c 1e 0d 1e 0e 1e 0f 1e |........|........|
|00001520| 10 1e 11 09 54 d2 a5 16 | 0f 0b 54 d2 a5 16 0e d3 |....T...|..T.....|
|00001530| 0e 0f 5e 16 0d d3 0e 0e | 5e 16 0c d4 16 11 d4 0e |..^.....|^.......|
|00001540| 0d 58 ab a0 d4 16 10 d4 | 0e 0e 58 ab 8f d5 0e 11 |.X......|..X.....|
|00001550| 0e 10 5c 22 88 0e 10 54 | 89 16 10 aa 6c 0e 11 54 |..\"...T|....l..T|
|00001560| 89 16 11 aa 5b 0e 11 0e | 0f 58 ab a0 d4 16 10 d4 |....[...|.X......|
|00001570| 0e 0c 58 ab 8f d5 0e 11 | 0e 10 5c 22 88 0e 10 54 |..X.....|..\"...T|
|00001580| 89 16 10 aa 6c 0e 11 54 | 89 16 11 aa 5b 2e 06 c5 |....l..T|....[...|
|00001590| 0e 06 21 10 09 12 0b 89 | 14 87 22 20 5b 67 6f 6d |..!.....|.." [gom|
|000015a0| 6f 6b 75 2d 73 61 76 65 | 64 2d 73 63 6f 72 65 2d |oku-save|d-score-|
|000015b0| 74 61 62 6c 65 20 67 6f | 6d 6f 6b 75 2d 62 6f 61 |table go|moku-boa|
|000015c0| 72 64 2d 77 69 64 74 68 | 20 67 6f 6d 6f 6b 75 2d |rd-width| gomoku-|
|000015d0| 73 61 76 65 64 2d 62 6f | 61 72 64 2d 77 69 64 74 |saved-bo|ard-widt|
|000015e0| 68 20 67 6f 6d 6f 6b 75 | 2d 62 6f 61 72 64 2d 68 |h gomoku|-board-h|
|000015f0| 65 69 67 68 74 20 67 6f | 6d 6f 6b 75 2d 73 61 76 |eight go|moku-sav|
|00001600| 65 64 2d 62 6f 61 72 64 | 2d 68 65 69 67 68 74 20 |ed-board|-height |
|00001610| 63 6f 70 79 2d 73 65 71 | 75 65 6e 63 65 20 67 6f |copy-seq|uence go|
|00001620| 6d 6f 6b 75 2d 73 63 6f | 72 65 2d 74 61 62 6c 65 |moku-sco|re-table|
|00001630| 20 6d 61 6b 65 2d 76 65 | 63 74 6f 72 20 67 6f 6d | make-ve|ctor gom|
|00001640| 6f 6b 75 2d 76 65 63 74 | 6f 72 2d 6c 65 6e 67 74 |oku-vect|or-lengt|
|00001650| 68 20 6e 69 6c 2d 73 63 | 6f 72 65 20 32 30 20 6e |h nil-sc|ore 20 n|
|00001660| 69 6c 20 6d 61 78 6a 32 | 20 6d 61 78 69 32 20 6d |il maxj2| maxi2 m|
|00001670| 61 78 6a 20 6d 61 78 69 | 20 6a 20 69 20 32 20 34 |axj maxi| j i 2 4|
|00001680| 20 31 20 67 6f 6d 6f 6b | 75 2d 69 6e 69 74 2d 73 | 1 gomok|u-init-s|
|00001690| 71 75 61 72 65 2d 73 63 | 6f 72 65 5d 20 37 20 28 |quare-sc|ore] 7 (|
|000016a0| 23 24 20 2e 20 35 32 35 | 35 29 5d 29 0a 23 40 35 |#$ . 525|5)]).#@5|
|000016b0| 33 20 52 65 74 75 72 6e | 20 74 68 65 20 6e 75 6d |3 Return| the num|
|000016c0| 62 65 72 20 6f 66 20 71 | 74 75 70 6c 65 73 20 63 |ber of q|tuples c|
|000016d0| 6f 6e 74 61 69 6e 69 6e | 67 20 73 71 75 61 72 65 |ontainin|g square|
|000016e0| 20 49 2c 4a 2e 1f 0a 28 | 64 65 66 61 6c 69 61 73 | I,J...(|defalias|
|000016f0| 20 27 67 6f 6d 6f 6b 75 | 2d 6e 62 2d 71 74 75 70 | 'gomoku|-nb-qtup|
|00001700| 6c 65 73 20 23 5b 28 69 | 20 6a 29 20 22 c0 09 53 |les #[(i| j) "..S|
|00001710| 5e c0 5c 6e 09 5a 5e c0 | 0b 53 5e c0 0c 0b 5a 5e |^.\n.Z^.|.S^...Z^|
|00001720| 1d 1e 06 1e 07 89 1e 08 | 0e 07 5c 5c c9 5d ca 5e |........|..\\.].^|
|00001730| 0e 06 0d 5c 5c c9 5d ca | 5e 5c 5c 0e 08 0e 06 5e |...\\.].|^\\....^|
|00001740| 0e 07 0d 5e 5c 5c c9 5d | ca 5e 5c 5c 0e 07 0e 06 |...^\\.]|.^\\....|
|00001750| 5e 0e 08 0d 5e 5c 5c c9 | 5d ca 5e 5c 5c cb 5c 5c |^...^\\.|].^\\.\\|
|00001760| 2c 87 22 20 5b 34 20 69 | 20 67 6f 6d 6f 6b 75 2d |,." [4 i| gomoku-|
|00001770| 62 6f 61 72 64 2d 77 69 | 64 74 68 20 6a 20 67 6f |board-wi|dth j go|
|00001780| 6d 6f 6b 75 2d 62 6f 61 | 72 64 2d 68 65 69 67 68 |moku-boa|rd-heigh|
|00001790| 74 20 64 6f 77 6e 20 75 | 70 20 72 69 67 68 74 20 |t down u|p right |
|000017a0| 6c 65 66 74 20 33 20 38 | 20 2d 31 32 5d 20 37 20 |left 3 8| -12] 7 |
|000017b0| 28 23 24 20 2e 20 35 38 | 31 30 29 5d 29 0a 23 40 |(#$ . 58|10)]).#@|
|000017c0| 36 30 20 47 69 76 65 20 | 69 6e 69 74 69 61 6c 20 |60 Give |initial |
|000017d0| 73 63 6f 72 65 20 74 6f | 20 73 71 75 61 72 65 20 |score to| square |
|000017e0| 49 2c 4a 20 61 6e 64 20 | 74 6f 20 69 74 73 20 6d |I,J and |to its m|
|000017f0| 69 72 72 6f 72 20 69 6d | 61 67 65 73 2e 1f 0a 28 |irror im|ages...(|
|00001800| 64 65 66 61 6c 69 61 73 | 20 27 67 6f 6d 6f 6b 75 |defalias| 'gomoku|
|00001810| 2d 69 6e 69 74 2d 73 71 | 75 61 72 65 2d 73 63 6f |-init-sq|uare-sco|
|00001820| 72 65 20 23 5b 28 69 20 | 6a 29 20 22 08 09 5a 54 |re #[(i |j) "..ZT|
|00001830| 5c 6e 0b 5a 54 c4 09 0b | 5c 22 0d c6 48 5f 1e 07 |\n.ZT...|\"..H_..|
|00001840| 1e 08 1e 09 0e 5c 6e cb | 09 0b 5c 22 0e 07 49 88 |.....\n.|..\"..I.|
|00001850| 0e 5c 6e cb 0e 09 0b 5c | 22 0e 07 49 88 0e 5c 6e |.\n....\|"..I..\n|
|00001860| cb 09 0e 08 5c 22 0e 07 | 49 88 0e 5c 6e cb 0e 09 |....\"..|I..\n...|
|00001870| 0e 08 5c 22 0e 07 49 2b | 87 22 20 5b 67 6f 6d 6f |..\"..I+|." [gomo|
|00001880| 6b 75 2d 62 6f 61 72 64 | 2d 77 69 64 74 68 20 69 |ku-board|-width i|
|00001890| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 2d 68 65 | gomoku-|board-he|
|000018a0| 69 67 68 74 20 6a 20 67 | 6f 6d 6f 6b 75 2d 6e 62 |ight j g|omoku-nb|
|000018b0| 2d 71 74 75 70 6c 65 73 | 20 67 6f 6d 6f 6b 75 2d |-qtuples| gomoku-|
|000018c0| 73 63 6f 72 65 2d 74 72 | 61 6e 73 2d 74 61 62 6c |score-tr|ans-tabl|
|000018d0| 65 20 30 20 73 63 20 6a | 6a 20 69 69 20 67 6f 6d |e 0 sc j|j ii gom|
|000018e0| 6f 6b 75 2d 73 63 6f 72 | 65 2d 74 61 62 6c 65 20 |oku-scor|e-table |
|000018f0| 67 6f 6d 6f 6b 75 2d 78 | 79 2d 74 6f 2d 69 6e 64 |gomoku-x|y-to-ind|
|00001900| 65 78 5d 20 35 20 28 23 | 24 20 2e 20 36 30 38 33 |ex] 5 (#|$ . 6083|
|00001910| 29 5d 29 0a 23 40 36 30 | 20 55 70 64 61 74 65 20 |)]).#@60| Update |
|00001920| 73 63 6f 72 65 20 74 61 | 62 6c 65 20 61 66 74 65 |score ta|ble afte|
|00001930| 72 20 53 51 55 41 52 45 | 20 72 65 63 65 69 76 65 |r SQUARE| receive|
|00001940| 64 20 61 20 44 56 41 4c | 20 69 6e 63 72 65 6d 65 |d a DVAL| increme|
|00001950| 6e 74 2e 1f 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |nt...(de|falias '|
|00001960| 67 6f 6d 6f 6b 75 2d 75 | 70 64 61 74 65 2d 73 63 |gomoku-u|pdate-sc|
|00001970| 6f 72 65 2d 74 61 62 6c | 65 20 23 5b 28 73 71 75 |ore-tabl|e #[(squ|
|00001980| 61 72 65 20 64 76 61 6c | 29 20 22 c0 09 21 1a c3 |are dval|) "..!..|
|00001990| 09 21 1c c5 c6 5c 6e 5a | 5d 1e 07 c5 c6 0c 5a 5d |.!...\nZ|].....Z]|
|000019a0| 1e 08 c9 0e 5c 6e 5c 6e | 5a cb 5a 5e 1e 0c c9 0e |....\n\n|Z.Z^....|
|000019b0| 0d 0c 5a cb 5a 5e 1e 0e | cf 0e 07 0e 0c 09 c6 c9 |..Z.Z^..|........|
|000019c0| 0e 10 26 06 88 cf 0e 08 | 0e 0e 09 c9 c6 0e 10 26 |..&.....|.......&|
|000019d0| 06 88 cf 0e 07 0e 08 5d | 0e 0c 0e 0e 5e 09 c6 89 |.......]|....^...|
|000019e0| 0e 10 26 06 88 cf c6 0c | 5a c5 5d 5c 6e 0e 5c 6e |..&.....|Z.]\n.\n|
|000019f0| 5a 5d c9 5c 6e d1 5a 5e | 0e 0d 0c 5a cb 5a 5e 09 |Z].\n.Z^|...Z.Z^.|
|00001a00| d2 c6 0e 10 26 06 2e 06 | 87 22 20 5b 67 6f 6d 6f |....&...|." [gomo|
|00001a10| 6b 75 2d 69 6e 64 65 78 | 2d 74 6f 2d 78 20 73 71 |ku-index|-to-x sq|
|00001a20| 75 61 72 65 20 78 20 67 | 6f 6d 6f 6b 75 2d 69 6e |uare x g|omoku-in|
|00001a30| 64 65 78 2d 74 6f 2d 79 | 20 79 20 2d 34 20 31 20 |dex-to-y| y -4 1 |
|00001a40| 69 6d 69 6e 20 6a 6d 69 | 6e 20 30 20 67 6f 6d 6f |imin jmi|n 0 gomo|
|00001a50| 6b 75 2d 62 6f 61 72 64 | 2d 77 69 64 74 68 20 34 |ku-board|-width 4|
|00001a60| 20 69 6d 61 78 20 67 6f | 6d 6f 6b 75 2d 62 6f 61 | imax go|moku-boa|
|00001a70| 72 64 2d 68 65 69 67 68 | 74 20 6a 6d 61 78 20 67 |rd-heigh|t jmax g|
|00001a80| 6f 6d 6f 6b 75 2d 75 70 | 64 61 74 65 2d 73 63 6f |omoku-up|date-sco|
|00001a90| 72 65 2d 69 6e 2d 64 69 | 72 65 63 74 69 6f 6e 20 |re-in-di|rection |
|00001aa0| 64 76 61 6c 20 35 20 2d | 31 5d 20 37 20 28 23 24 |dval 5 -|1] 7 (#$|
|00001ab0| 20 2e 20 36 34 32 35 29 | 5d 29 0a 23 40 31 38 37 | . 6425)|]).#@187|
|00001ac0| 20 55 70 64 61 74 65 20 | 73 63 6f 72 65 73 20 66 | Update |scores f|
|00001ad0| 6f 72 20 61 6c 6c 20 73 | 71 75 61 72 65 73 20 69 |or all s|quares i|
|00001ae0| 6e 20 74 68 65 20 71 74 | 75 70 6c 65 73 20 73 74 |n the qt|uples st|
|00001af0| 61 72 74 69 6e 67 20 62 | 65 74 77 65 65 6e 20 74 |arting b|etween t|
|00001b00| 68 65 20 4c 45 46 54 74 | 68 0a 73 71 75 61 72 65 |he LEFTt|h.square|
|00001b10| 20 61 6e 64 20 74 68 65 | 20 52 49 47 48 54 74 68 | and the| RIGHTth|
|00001b20| 20 61 66 74 65 72 20 53 | 51 55 41 52 45 2c 20 61 | after S|QUARE, a|
|00001b30| 6c 6f 6e 67 20 74 68 65 | 20 44 58 2c 20 44 59 20 |long the| DX, DY |
|00001b40| 64 69 72 65 63 74 69 6f | 6e 2c 20 63 6f 6e 73 69 |directio|n, consi|
|00001b50| 64 65 72 69 6e 67 0a 74 | 68 61 74 20 44 56 41 4c |dering.t|hat DVAL|
|00001b60| 20 68 61 73 20 62 65 65 | 6e 20 61 64 64 65 64 20 | has bee|n added |
|00001b70| 6f 6e 20 53 51 55 41 52 | 45 2e 1f 0a 28 64 65 66 |on SQUAR|E...(def|
|00001b80| 61 6c 69 61 73 20 27 67 | 6f 6d 6f 6b 75 2d 75 70 |alias 'g|omoku-up|
|00001b90| 64 61 74 65 2d 73 63 6f | 72 65 2d 69 6e 2d 64 69 |date-sco|re-in-di|
|00001ba0| 72 65 63 74 69 6f 6e 20 | 23 5b 28 6c 65 66 74 20 |rection |#[(left |
|00001bb0| 72 69 67 68 74 20 73 71 | 75 61 72 65 20 64 78 20 |right sq|uare dx |
|00001bc0| 64 79 20 64 76 61 6c 29 | 20 22 08 09 56 86 b6 00 |dy dval)| "..V...|
|00001bd0| c2 89 89 89 89 89 1b 1c | 1d 1e 06 1e 07 1e 08 c9 |........|........|
|00001be0| 0e 5c 6e 0e 0b 5c 22 16 | 08 0e 0c 08 0e 08 5f 5c |.\n..\".|......_\|
|00001bf0| 5c 16 07 0e 0c 09 0e 08 | 5f 5c 5c 16 06 0e 07 0e |\.......|_\\.....|
|00001c00| 08 cd 5f 5c 5c 15 0e 07 | 16 0c ce 14 0e 0c 0d 58 |.._\\...|.......X|
|00001c10| ab 92 0c 0e 0f 0e 0c 48 | 5c 5c 14 0e 0c 0e 08 5c |.......H|\\.....\|
|00001c20| 5c 89 16 0c aa 6a 0e 07 | 0e 06 58 ad d8 0e 10 0c |\....j..|..X.....|
|00001c30| 48 0e 10 0c 0e 11 5a 48 | 5a 89 13 ce 55 ac a9 0e |H.....ZH|Z...U...|
|00001c40| 07 89 16 0c 0d 58 ab a0 | 0e 0f 0e 0c 48 ce 55 ab |.....X..|....H.U.|
|00001c50| 8d 0e 12 0e 0c 0e 12 0e | 0c 48 0b 5c 5c 49 88 0e |........|.H.\\I..|
|00001c60| 0c 0e 08 5c 5c 89 16 0c | aa 5c 5c 0d 0e 08 5c 5c |...\\...|.\\...\\|
|00001c70| 15 0c 0e 0f 0e 07 48 5b | 5c 5c 0e 0f 0d 48 5c 5c |......H[|\\...H\\|
|00001c80| 14 0e 07 0e 08 5c 5c 89 | 16 07 aa 23 2e 06 87 22 |.....\\.|...#..."|
|00001c90| 20 5b 6c 65 66 74 20 72 | 69 67 68 74 20 6e 69 6c | [left r|ight nil|
|00001ca0| 20 64 65 6c 74 61 20 63 | 6f 75 6e 74 20 73 71 75 | delta c|ount squ|
|00001cb0| 61 72 65 32 20 73 71 75 | 61 72 65 31 20 73 71 75 |are2 squ|are1 squ|
|00001cc0| 61 72 65 30 20 64 65 70 | 6c 20 67 6f 6d 6f 6b 75 |are0 dep|l gomoku|
|00001cd0| 2d 78 79 2d 74 6f 2d 69 | 6e 64 65 78 20 64 78 20 |-xy-to-i|ndex dx |
|00001ce0| 64 79 20 73 71 75 61 72 | 65 20 34 20 30 20 67 6f |dy squar|e 4 0 go|
|00001cf0| 6d 6f 6b 75 2d 62 6f 61 | 72 64 20 67 6f 6d 6f 6b |moku-boa|rd gomok|
|00001d00| 75 2d 73 63 6f 72 65 2d | 74 72 61 6e 73 2d 74 61 |u-score-|trans-ta|
|00001d10| 62 6c 65 20 64 76 61 6c | 20 67 6f 6d 6f 6b 75 2d |ble dval| gomoku-|
|00001d20| 73 63 6f 72 65 2d 74 61 | 62 6c 65 5d 20 37 20 28 |score-ta|ble] 7 (|
|00001d30| 23 24 20 2e 20 36 38 34 | 39 29 5d 29 0a 23 40 33 |#$ . 684|9)]).#@3|
|00001d40| 35 20 4e 6f 6e 2d 6e 69 | 6c 20 69 66 20 61 20 67 |5 Non-ni|l if a g|
|00001d50| 61 6d 65 20 69 73 20 69 | 6e 20 70 72 6f 67 72 65 |ame is i|n progre|
|00001d60| 73 73 2e 1f 0a 28 64 65 | 66 76 61 72 20 67 6f 6d |ss...(de|fvar gom|
|00001d70| 6f 6b 75 2d 67 61 6d 65 | 2d 69 6e 2d 70 72 6f 67 |oku-game|-in-prog|
|00001d80| 72 65 73 73 20 6e 69 6c | 20 28 23 24 20 2e 20 37 |ress nil| (#$ . 7|
|00001d90| 34 39 30 29 29 0a 23 40 | 36 36 20 41 20 72 65 63 |490)).#@|66 A rec|
|00001da0| 6f 72 64 20 6f 66 20 61 | 6c 6c 20 6d 6f 76 65 73 |ord of a|ll moves|
|00001db0| 20 74 68 61 74 20 68 61 | 76 65 20 62 65 65 6e 20 | that ha|ve been |
|00001dc0| 70 6c 61 79 65 64 20 64 | 75 72 69 6e 67 20 63 75 |played d|uring cu|
|00001dd0| 72 72 65 6e 74 20 67 61 | 6d 65 2e 1f 0a 28 64 65 |rrent ga|me...(de|
|00001de0| 66 76 61 72 20 67 6f 6d | 6f 6b 75 2d 67 61 6d 65 |fvar gom|oku-game|
|00001df0| 2d 68 69 73 74 6f 72 79 | 20 6e 69 6c 20 28 23 24 |-history| nil (#$|
|00001e00| 20 2e 20 37 35 37 39 29 | 29 0a 23 40 34 39 20 4e | . 7579)|).#@49 N|
|00001e10| 75 6d 62 65 72 20 6f 66 | 20 6d 6f 76 65 73 20 61 |umber of| moves a|
|00001e20| 6c 72 65 61 64 79 20 70 | 6c 61 79 65 64 20 69 6e |lready p|layed in|
|00001e30| 20 63 75 72 72 65 6e 74 | 20 67 61 6d 65 2e 1f 0a | current| game...|
|00001e40| 28 64 65 66 76 61 72 20 | 67 6f 6d 6f 6b 75 2d 6e |(defvar |gomoku-n|
|00001e50| 75 6d 62 65 72 2d 6f 66 | 2d 6d 6f 76 65 73 20 6e |umber-of|-moves n|
|00001e60| 69 6c 20 28 23 24 20 2e | 20 37 36 39 35 29 29 0a |il (#$ .| 7695)).|
|00001e70| 23 40 35 38 20 4e 75 6d | 62 65 72 20 6f 66 20 6d |#@58 Num|ber of m|
|00001e80| 6f 76 65 73 20 61 6c 72 | 65 61 64 79 20 70 6c 61 |oves alr|eady pla|
|00001e90| 79 65 64 20 62 79 20 68 | 75 6d 61 6e 20 69 6e 20 |yed by h|uman in |
|00001ea0| 63 75 72 72 65 6e 74 20 | 67 61 6d 65 2e 1f 0a 28 |current |game...(|
|00001eb0| 64 65 66 76 61 72 20 67 | 6f 6d 6f 6b 75 2d 6e 75 |defvar g|omoku-nu|
|00001ec0| 6d 62 65 72 2d 6f 66 2d | 68 75 6d 61 6e 2d 6d 6f |mber-of-|human-mo|
|00001ed0| 76 65 73 20 6e 69 6c 20 | 28 23 24 20 2e 20 37 37 |ves nil |(#$ . 77|
|00001ee0| 39 37 29 29 0a 23 40 33 | 32 20 4e 6f 6e 2d 6e 69 |97)).#@3|2 Non-ni|
|00001ef0| 6c 20 69 66 20 45 6d 61 | 63 73 20 70 6c 61 79 65 |l if Ema|cs playe|
|00001f00| 64 20 66 69 72 73 74 2e | 1f 0a 28 64 65 66 76 61 |d first.|..(defva|
|00001f10| 72 20 67 6f 6d 6f 6b 75 | 2d 65 6d 61 63 73 2d 70 |r gomoku|-emacs-p|
|00001f20| 6c 61 79 65 64 2d 66 69 | 72 73 74 20 6e 69 6c 20 |layed-fi|rst nil |
|00001f30| 28 23 24 20 2e 20 37 39 | 31 34 29 29 0a 23 40 35 |(#$ . 79|14)).#@5|
|00001f40| 32 20 4e 6f 6e 2d 6e 69 | 6c 20 69 66 20 48 75 6d |2 Non-ni|l if Hum|
|00001f50| 61 6e 20 74 6f 6f 6b 20 | 62 61 63 6b 20 61 20 6d |an took |back a m|
|00001f60| 6f 76 65 20 64 75 72 69 | 6e 67 20 74 68 65 20 67 |ove duri|ng the g|
|00001f70| 61 6d 65 2e 1f 0a 28 64 | 65 66 76 61 72 20 67 6f |ame...(d|efvar go|
|00001f80| 6d 6f 6b 75 2d 68 75 6d | 61 6e 2d 74 6f 6f 6b 2d |moku-hum|an-took-|
|00001f90| 62 61 63 6b 20 6e 69 6c | 20 28 23 24 20 2e 20 38 |back nil| (#$ . 8|
|00001fa0| 30 30 32 29 29 0a 23 40 | 34 39 20 4e 6f 6e 2d 6e |002)).#@|49 Non-n|
|00001fb0| 69 6c 20 69 66 20 48 75 | 6d 61 6e 20 72 65 66 75 |il if Hu|man refu|
|00001fc0| 73 65 64 20 45 6d 61 63 | 73 20 6f 66 66 65 72 20 |sed Emac|s offer |
|00001fd0| 6f 66 20 61 20 64 72 61 | 77 2e 1f 0a 28 64 65 66 |of a dra|w...(def|
|00001fe0| 76 61 72 20 67 6f 6d 6f | 6b 75 2d 68 75 6d 61 6e |var gomo|ku-human|
|00001ff0| 2d 72 65 66 75 73 65 64 | 2d 64 72 61 77 20 6e 69 |-refused|-draw ni|
|00002000| 6c 20 28 23 24 20 2e 20 | 38 31 30 37 29 29 0a 23 |l (#$ . |8107)).#|
|00002010| 40 35 33 20 4e 6f 6e 2d | 6e 69 6c 20 69 66 20 45 |@53 Non-|nil if E|
|00002020| 6d 61 63 73 20 69 73 20 | 69 6e 20 74 68 65 20 6d |macs is |in the m|
|00002030| 69 64 64 6c 65 20 6f 66 | 20 61 20 63 6f 6d 70 75 |iddle of| a compu|
|00002040| 74 61 74 69 6f 6e 2e 1f | 0a 28 64 65 66 76 61 72 |tation..|.(defvar|
|00002050| 20 67 6f 6d 6f 6b 75 2d | 65 6d 61 63 73 2d 69 73 | gomoku-|emacs-is|
|00002060| 2d 63 6f 6d 70 75 74 69 | 6e 67 20 6e 69 6c 20 28 |-computi|ng nil (|
|00002070| 23 24 20 2e 20 38 32 31 | 32 29 29 0a 23 40 34 33 |#$ . 821|2)).#@43|
|00002080| 20 49 6e 69 74 69 61 6c | 69 7a 65 20 61 20 6e 65 | Initial|ize a ne|
|00002090| 77 20 67 61 6d 65 20 6f | 6e 20 61 6e 20 4e 20 62 |w game o|n an N b|
|000020a0| 79 20 4d 20 62 6f 61 72 | 64 2e 1f 0a 28 64 65 66 |y M boar|d...(def|
|000020b0| 61 6c 69 61 73 20 27 67 | 6f 6d 6f 6b 75 2d 73 74 |alias 'g|omoku-st|
|000020c0| 61 72 74 2d 67 61 6d 65 | 20 23 5b 28 6e 20 6d 29 |art-game| #[(n m)|
|000020d0| 20 22 c0 11 c0 12 0b 14 | 0d 16 06 0d c7 5c 5c 0b | "......|.....\\.|
|000020e0| 54 5f 54 16 08 0b 0d 5f | c9 5f ca a5 16 0b cc 16 |T_T...._|._......|
|000020f0| 0d ce 16 0f ce 16 10 cc | 16 11 cc 16 12 cc 16 13 |........|........|
|00002100| d4 0b 0d 5c 22 88 d5 20 | 88 d6 20 88 cc 89 11 87 |...\".. |.. .....|
|00002110| 22 20 5b 74 20 67 6f 6d | 6f 6b 75 2d 65 6d 61 63 |" [t gom|oku-emac|
|00002120| 73 2d 69 73 2d 63 6f 6d | 70 75 74 69 6e 67 20 67 |s-is-com|puting g|
|00002130| 6f 6d 6f 6b 75 2d 67 61 | 6d 65 2d 69 6e 2d 70 72 |omoku-ga|me-in-pr|
|00002140| 6f 67 72 65 73 73 20 6e | 20 67 6f 6d 6f 6b 75 2d |ogress n| gomoku-|
|00002150| 62 6f 61 72 64 2d 77 69 | 64 74 68 20 6d 20 67 6f |board-wi|dth m go|
|00002160| 6d 6f 6b 75 2d 62 6f 61 | 72 64 2d 68 65 69 67 68 |moku-boa|rd-heigh|
|00002170| 74 20 32 20 67 6f 6d 6f | 6b 75 2d 76 65 63 74 6f |t 2 gomo|ku-vecto|
|00002180| 72 2d 6c 65 6e 67 74 68 | 20 37 20 31 30 20 67 6f |r-length| 7 10 go|
|00002190| 6d 6f 6b 75 2d 64 72 61 | 77 2d 6c 69 6d 69 74 20 |moku-dra|w-limit |
|000021a0| 6e 69 6c 20 67 6f 6d 6f | 6b 75 2d 67 61 6d 65 2d |nil gomo|ku-game-|
|000021b0| 68 69 73 74 6f 72 79 20 | 30 20 67 6f 6d 6f 6b 75 |history |0 gomoku|
|000021c0| 2d 6e 75 6d 62 65 72 2d | 6f 66 2d 6d 6f 76 65 73 |-number-|of-moves|
|000021d0| 20 67 6f 6d 6f 6b 75 2d | 6e 75 6d 62 65 72 2d 6f | gomoku-|number-o|
|000021e0| 66 2d 68 75 6d 61 6e 2d | 6d 6f 76 65 73 20 67 6f |f-human-|moves go|
|000021f0| 6d 6f 6b 75 2d 65 6d 61 | 63 73 2d 70 6c 61 79 65 |moku-ema|cs-playe|
|00002200| 64 2d 66 69 72 73 74 20 | 67 6f 6d 6f 6b 75 2d 68 |d-first |gomoku-h|
|00002210| 75 6d 61 6e 2d 74 6f 6f | 6b 2d 62 61 63 6b 20 67 |uman-too|k-back g|
|00002220| 6f 6d 6f 6b 75 2d 68 75 | 6d 61 6e 2d 72 65 66 75 |omoku-hu|man-refu|
|00002230| 73 65 64 2d 64 72 61 77 | 20 67 6f 6d 6f 6b 75 2d |sed-draw| gomoku-|
|00002240| 69 6e 69 74 2d 64 69 73 | 70 6c 61 79 20 67 6f 6d |init-dis|play gom|
|00002250| 6f 6b 75 2d 69 6e 69 74 | 2d 73 63 6f 72 65 2d 74 |oku-init|-score-t|
|00002260| 61 62 6c 65 20 67 6f 6d | 6f 6b 75 2d 69 6e 69 74 |able gom|oku-init|
|00002270| 2d 62 6f 61 72 64 5d 20 | 33 20 28 23 24 20 2e 20 |-board] |3 (#$ . |
|00002280| 38 33 32 31 29 5d 29 0a | 23 40 34 37 20 47 6f 20 |8321)]).|#@47 Go |
|00002290| 74 6f 20 53 51 55 41 52 | 45 2c 20 70 6c 61 79 20 |to SQUAR|E, play |
|000022a0| 56 41 4c 20 61 6e 64 20 | 75 70 64 61 74 65 20 65 |VAL and |update e|
|000022b0| 76 65 72 79 74 68 69 6e | 67 2e 1f 0a 28 64 65 66 |verythin|g...(def|
|000022c0| 61 6c 69 61 73 20 27 67 | 6f 6d 6f 6b 75 2d 70 6c |alias 'g|omoku-pl|
|000022d0| 61 79 2d 6d 6f 76 65 20 | 23 5b 28 73 71 75 61 72 |ay-move |#[(squar|
|000022e0| 65 20 76 61 6c 20 26 6f | 70 74 69 6f 6e 61 6c 20 |e val &o|ptional |
|000022f0| 64 6f 6e 74 2d 75 70 64 | 61 74 65 2d 73 63 6f 72 |dont-upd|ate-scor|
|00002300| 65 29 20 22 c0 11 5c 6e | c3 55 ab 85 0c 54 14 aa |e) "..\n|.U...T..|
|00002310| 88 0d c6 55 ab 83 c0 16 | 07 0e 08 0e 09 0e 08 48 |...U....|.......H|
|00002320| 42 0e 5c 6e 42 16 5c 6e | 0d 54 15 cb 0e 08 5c 6e |B.\nB.\n|.T....\n|
|00002330| 5c 22 88 0e 0c 0e 08 5c | 6e 49 88 0e 0d ac 8d ce |\".....\|nI......|
|00002340| 0e 08 5c 6e 5c 22 88 0e | 09 0e 08 cf 49 88 d0 89 |..\n\"..|....I...|
|00002350| 11 87 22 20 5b 74 20 67 | 6f 6d 6f 6b 75 2d 65 6d |.." [t g|omoku-em|
|00002360| 61 63 73 2d 69 73 2d 63 | 6f 6d 70 75 74 69 6e 67 |acs-is-c|omputing|
|00002370| 20 76 61 6c 20 31 20 67 | 6f 6d 6f 6b 75 2d 6e 75 | val 1 g|omoku-nu|
|00002380| 6d 62 65 72 2d 6f 66 2d | 68 75 6d 61 6e 2d 6d 6f |mber-of-|human-mo|
|00002390| 76 65 73 20 67 6f 6d 6f | 6b 75 2d 6e 75 6d 62 65 |ves gomo|ku-numbe|
|000023a0| 72 2d 6f 66 2d 6d 6f 76 | 65 73 20 30 20 67 6f 6d |r-of-mov|es 0 gom|
|000023b0| 6f 6b 75 2d 65 6d 61 63 | 73 2d 70 6c 61 79 65 64 |oku-emac|s-played|
|000023c0| 2d 66 69 72 73 74 20 73 | 71 75 61 72 65 20 67 6f |-first s|quare go|
|000023d0| 6d 6f 6b 75 2d 73 63 6f | 72 65 2d 74 61 62 6c 65 |moku-sco|re-table|
|000023e0| 20 67 6f 6d 6f 6b 75 2d | 67 61 6d 65 2d 68 69 73 | gomoku-|game-his|
|000023f0| 74 6f 72 79 20 67 6f 6d | 6f 6b 75 2d 70 6c 6f 74 |tory gom|oku-plot|
|00002400| 2d 73 71 75 61 72 65 20 | 67 6f 6d 6f 6b 75 2d 62 |-square |gomoku-b|
|00002410| 6f 61 72 64 20 64 6f 6e | 74 2d 75 70 64 61 74 65 |oard don|t-update|
|00002420| 2d 73 63 6f 72 65 20 67 | 6f 6d 6f 6b 75 2d 75 70 |-score g|omoku-up|
|00002430| 64 61 74 65 2d 73 63 6f | 72 65 2d 74 61 62 6c 65 |date-sco|re-table|
|00002440| 20 2d 31 20 6e 69 6c 5d | 20 33 20 28 23 24 20 2e | -1 nil]| 3 (#$ .|
|00002450| 20 38 38 34 35 29 5d 29 | 0a 23 40 34 34 20 54 61 | 8845)])|.#@44 Ta|
|00002460| 6b 65 20 62 61 63 6b 20 | 6c 61 73 74 20 6d 6f 76 |ke back |last mov|
|00002470| 65 20 61 6e 64 20 75 70 | 64 61 74 65 20 65 76 65 |e and up|date eve|
|00002480| 72 79 74 68 69 6e 67 2e | 1f 0a 28 64 65 66 61 6c |rything.|..(defal|
|00002490| 69 61 73 20 27 67 6f 6d | 6f 6b 75 2d 74 61 6b 65 |ias 'gom|oku-take|
|000024a0| 2d 62 61 63 6b 20 23 5b | 6e 69 6c 20 22 c0 11 5c |-back #[|nil "..\|
|000024b0| 6e 40 89 1b 40 1c 0d 0c | 48 89 1e 06 c7 55 ab 85 |n@..@...|H....U..|
|000024c0| 0e 08 53 16 08 5c 6e 41 | 12 0e 09 53 16 09 ca 0c |..S..\nA|...S....|
|000024d0| cb 5c 22 88 0d 0c cb 49 | 88 cc 0c 0e 06 5b 5c 22 |.\"....I|.....[\"|
|000024e0| 88 0e 0d 0c 0b 41 49 88 | 2b ce 89 11 87 22 20 5b |.....AI.|+...." [|
|000024f0| 74 20 67 6f 6d 6f 6b 75 | 2d 65 6d 61 63 73 2d 69 |t gomoku|-emacs-i|
|00002500| 73 2d 63 6f 6d 70 75 74 | 69 6e 67 20 67 6f 6d 6f |s-comput|ing gomo|
|00002510| 6b 75 2d 67 61 6d 65 2d | 68 69 73 74 6f 72 79 20 |ku-game-|history |
|00002520| 6c 61 73 74 2d 6d 6f 76 | 65 20 73 71 75 61 72 65 |last-mov|e square|
|00002530| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 20 6f 6c | gomoku-|board ol|
|00002540| 64 76 61 6c 20 31 20 67 | 6f 6d 6f 6b 75 2d 6e 75 |dval 1 g|omoku-nu|
|00002550| 6d 62 65 72 2d 6f 66 2d | 68 75 6d 61 6e 2d 6d 6f |mber-of-|human-mo|
|00002560| 76 65 73 20 67 6f 6d 6f | 6b 75 2d 6e 75 6d 62 65 |ves gomo|ku-numbe|
|00002570| 72 2d 6f 66 2d 6d 6f 76 | 65 73 20 67 6f 6d 6f 6b |r-of-mov|es gomok|
|00002580| 75 2d 70 6c 6f 74 2d 73 | 71 75 61 72 65 20 30 20 |u-plot-s|quare 0 |
|00002590| 67 6f 6d 6f 6b 75 2d 75 | 70 64 61 74 65 2d 73 63 |gomoku-u|pdate-sc|
|000025a0| 6f 72 65 2d 74 61 62 6c | 65 20 67 6f 6d 6f 6b 75 |ore-tabl|e gomoku|
|000025b0| 2d 73 63 6f 72 65 2d 74 | 61 62 6c 65 20 6e 69 6c |-score-t|able nil|
|000025c0| 5d 20 34 20 28 23 24 20 | 2e 20 39 33 31 30 29 5d |] 4 (#$ |. 9310)]|
|000025d0| 29 0a 23 40 34 34 20 4e | 75 6d 62 65 72 20 6f 66 |).#@44 N|umber of|
|000025e0| 20 67 61 6d 65 73 20 45 | 6d 61 63 73 20 77 6f 6e | games E|macs won|
|000025f0| 20 69 6e 20 74 68 69 73 | 20 73 65 73 73 69 6f 6e | in this| session|
|00002600| 2e 1f 0a 28 64 65 66 76 | 61 72 20 67 6f 6d 6f 6b |...(defv|ar gomok|
|00002610| 75 2d 6e 75 6d 62 65 72 | 2d 6f 66 2d 65 6d 61 63 |u-number|-of-emac|
|00002620| 73 2d 77 69 6e 73 20 30 | 20 28 23 24 20 2e 20 39 |s-wins 0| (#$ . 9|
|00002630| 36 38 37 29 29 0a 23 40 | 34 32 20 4e 75 6d 62 65 |687)).#@|42 Numbe|
|00002640| 72 20 6f 66 20 67 61 6d | 65 73 20 79 6f 75 20 77 |r of gam|es you w|
|00002650| 6f 6e 20 69 6e 20 74 68 | 69 73 20 73 65 73 73 69 |on in th|is sessi|
|00002660| 6f 6e 2e 1f 0a 28 64 65 | 66 76 61 72 20 67 6f 6d |on...(de|fvar gom|
|00002670| 6f 6b 75 2d 6e 75 6d 62 | 65 72 2d 6f 66 2d 68 75 |oku-numb|er-of-hu|
|00002680| 6d 61 6e 2d 77 69 6e 73 | 20 30 20 28 23 24 20 2e |man-wins| 0 (#$ .|
|00002690| 20 39 37 38 37 29 29 0a | 23 40 34 38 20 4e 75 6d | 9787)).|#@48 Num|
|000026a0| 62 65 72 20 6f 66 20 67 | 61 6d 65 73 20 61 6c 72 |ber of g|ames alr|
|000026b0| 65 61 64 79 20 64 72 61 | 77 6e 20 69 6e 20 74 68 |eady dra|wn in th|
|000026c0| 69 73 20 73 65 73 73 69 | 6f 6e 2e 1f 0a 28 64 65 |is sessi|on...(de|
|000026d0| 66 76 61 72 20 67 6f 6d | 6f 6b 75 2d 6e 75 6d 62 |fvar gom|oku-numb|
|000026e0| 65 72 2d 6f 66 2d 64 72 | 61 77 73 20 30 20 28 23 |er-of-dr|aws 0 (#|
|000026f0| 24 20 2e 20 39 38 38 35 | 29 29 0a 23 40 34 31 20 |$ . 9885|)).#@41 |
|00002700| 54 65 72 6d 69 6e 61 74 | 65 20 74 68 65 20 63 75 |Terminat|e the cu|
|00002710| 72 72 65 6e 74 20 67 61 | 6d 65 20 77 69 74 68 20 |rrent ga|me with |
|00002720| 52 45 53 55 4c 54 2e 1f | 0a 28 64 65 66 61 6c 69 |RESULT..|.(defali|
|00002730| 61 73 20 27 67 6f 6d 6f | 6b 75 2d 74 65 72 6d 69 |as 'gomo|ku-termi|
|00002740| 6e 61 74 65 2d 67 61 6d | 65 20 23 5b 28 72 65 73 |nate-gam|e #[(res|
|00002750| 75 6c 74 29 20 22 c0 19 | 5c 6e c3 61 ab b8 0c 54 |ult) "..|\n.a...T|
|00002760| 14 0d c6 57 ab 83 c7 aa | aa 0e 08 ab 83 c9 aa a3 |...W....|........|
|00002770| 0e 5c 6e ab 83 cb aa 9c | 0e 0c ac 83 cd aa 95 0e |.\n.....|........|
|00002780| 0e cf 55 ab 8e 0e 10 cf | 55 ab 88 0c d1 56 ab 83 |..U.....|U....V..|
|00002790| d2 aa 81 d3 11 aa e7 5c | 6e d4 61 ab 97 0e 0e 54 |.......\|n.a....T|
|000027a0| 16 0e 0e 5c 6e ab 83 d5 | aa 88 0e 0c ab 83 d6 aa |...\n...|........|
|000027b0| 81 d7 11 aa cb 5c 6e d8 | 61 ab 87 0c 54 14 d9 11 |.....\n.|a...T...|
|000027c0| aa bf 5c 6e da 61 ab 97 | 0e 10 54 16 10 0e 5c 6e |..\n.a..|..T...\n|
|000027d0| ab 83 db aa 88 0e 0c ab | 83 dc aa 81 dd 11 aa a3 |........|........|
|000027e0| 5c 6e de 61 ab 97 0e 10 | 54 16 10 0e 5c 6e ab 83 |\n.a....|T...\n..|
|000027f0| df aa 88 0e 0c ab 83 e0 | aa 81 e1 11 aa 87 5c 6e |........|......\n|
|00002800| e2 61 ab 82 e3 11 e4 20 | 88 09 ab 84 c1 09 21 88 |.a..... |......!.|
|00002810| e5 20 88 c0 89 16 26 29 | 87 22 20 5b 6e 69 6c 20 |. ....&)|." [nil |
|00002820| 6d 65 73 73 61 67 65 20 | 72 65 73 75 6c 74 20 65 |message |result e|
|00002830| 6d 61 63 73 2d 77 6f 6e | 20 67 6f 6d 6f 6b 75 2d |macs-won| gomoku-|
|00002840| 6e 75 6d 62 65 72 2d 6f | 66 2d 65 6d 61 63 73 2d |number-o|f-emacs-|
|00002850| 77 69 6e 73 20 67 6f 6d | 6f 6b 75 2d 6e 75 6d 62 |wins gom|oku-numb|
|00002860| 65 72 2d 6f 66 2d 6d 6f | 76 65 73 20 32 30 20 22 |er-of-mo|ves 20 "|
|00002870| 54 68 69 73 20 77 61 73 | 20 61 20 52 45 41 4c 4c |This was| a REALL|
|00002880| 59 20 51 55 49 43 4b 20 | 77 69 6e 2e 22 20 67 6f |Y QUICK |win." go|
|00002890| 6d 6f 6b 75 2d 68 75 6d | 61 6e 2d 72 65 66 75 73 |moku-hum|an-refus|
|000028a0| 65 64 2d 64 72 61 77 20 | 22 49 20 77 6f 6e 2e 2e |ed-draw |"I won..|
|000028b0| 2e 20 54 6f 6f 20 62 61 | 64 20 79 6f 75 20 72 65 |. Too ba|d you re|
|000028c0| 66 75 73 65 64 20 6d 79 | 20 6f 66 66 65 72 20 6f |fused my| offer o|
|000028d0| 66 20 61 20 64 72 61 77 | 20 21 22 20 67 6f 6d 6f |f a draw| !" gomo|
|000028e0| 6b 75 2d 68 75 6d 61 6e | 2d 74 6f 6f 6b 2d 62 61 |ku-human|-took-ba|
|000028f0| 63 6b 20 22 49 20 77 6f | 6e 2e 2e 2e 20 54 61 6b |ck "I wo|n... Tak|
|00002900| 69 6e 67 20 6d 6f 76 65 | 73 20 62 61 63 6b 20 77 |ing move|s back w|
|00002910| 69 6c 6c 20 6e 6f 74 20 | 68 65 6c 70 20 79 6f 75 |ill not |help you|
|00002920| 20 21 22 20 67 6f 6d 6f | 6b 75 2d 65 6d 61 63 73 | !" gomo|ku-emacs|
|00002930| 2d 70 6c 61 79 65 64 2d | 66 69 72 73 74 20 22 49 |-played-|first "I|
|00002940| 20 77 6f 6e 2e 2e 2e 20 | 50 6c 61 79 69 6e 67 20 | won... |Playing |
|00002950| 66 69 72 73 74 20 64 69 | 64 20 6e 6f 74 20 68 65 |first di|d not he|
|00002960| 6c 70 20 79 6f 75 20 6d | 75 63 68 20 21 22 20 67 |lp you m|uch !" g|
|00002970| 6f 6d 6f 6b 75 2d 6e 75 | 6d 62 65 72 2d 6f 66 2d |omoku-nu|mber-of-|
|00002980| 68 75 6d 61 6e 2d 77 69 | 6e 73 20 30 20 67 6f 6d |human-wi|ns 0 gom|
|00002990| 6f 6b 75 2d 6e 75 6d 62 | 65 72 2d 6f 66 2d 64 72 |oku-numb|er-of-dr|
|000029a0| 61 77 73 20 31 20 22 49 | 27 6d 20 62 65 63 6f 6d |aws 1 "I|'m becom|
|000029b0| 69 6e 67 20 74 69 72 65 | 64 20 6f 66 20 77 69 6e |ing tire|d of win|
|000029c0| 6e 69 6e 67 2e 2e 2e 22 | 20 22 49 20 77 6f 6e 2e |ning..."| "I won.|
|000029d0| 22 20 68 75 6d 61 6e 2d | 77 6f 6e 20 22 4f 4b 2c |" human-|won "OK,|
|000029e0| 20 79 6f 75 20 77 6f 6e | 20 74 68 69 73 20 6f 6e | you won| this on|
|000029f0| 65 2e 20 49 2c 20 66 6f | 72 20 6f 6e 65 2c 20 6e |e. I, fo|r one, n|
|00002a00| 65 76 65 72 20 74 61 6b | 65 20 6d 79 20 6d 6f 76 |ever tak|e my mov|
|00002a10| 65 73 20 62 61 63 6b 2e | 2e 2e 22 20 22 4f 4b 2c |es back.|.." "OK,|
|00002a20| 20 79 6f 75 20 77 6f 6e | 20 74 68 69 73 20 6f 6e | you won| this on|
|00002a30| 65 2e 2e 2e 20 73 6f 20 | 77 68 61 74 20 3f 22 20 |e... so |what ?" |
|00002a40| 22 4f 4b 2c 20 79 6f 75 | 20 77 6f 6e 20 74 68 69 |"OK, you| won thi|
|00002a50| 73 20 6f 6e 65 2e 20 4e | 6f 77 2c 20 6c 65 74 20 |s one. N|ow, let |
|00002a60| 6d 65 20 70 6c 61 79 20 | 66 69 72 73 74 20 6a 75 |me play |first ju|
|00002a70| 73 74 20 6f 6e 63 65 2e | 22 20 68 75 6d 61 6e 2d |st once.|" human-|
|00002a80| 72 65 73 69 67 6e 65 64 | 20 22 53 6f 20 79 6f 75 |resigned| "So you|
|00002a90| 20 72 65 73 69 67 6e 2e | 20 20 54 68 61 74 27 73 | resign.| That's|
|00002aa0| 20 6a 75 73 74 20 6f 6e | 65 20 6d 6f 72 65 20 77 | just on|e more w|
|00002ab0| 69 6e 20 66 6f 72 20 6d | 65 2e 22 20 6e 6f 62 6f |in for m|e." nobo|
|00002ac0| 64 79 2d 77 6f 6e 20 22 | 54 68 69 73 20 69 73 20 |dy-won "|This is |
|00002ad0| 61 20 64 72 61 77 2e 20 | 49 2c 20 66 6f 72 20 6f |a draw. |I, for o|
|00002ae0| 6e 65 2c 20 6e 65 76 65 | 72 20 74 61 6b 65 20 6d |ne, neve|r take m|
|00002af0| 79 20 6d 6f 76 65 73 20 | 62 61 63 6b 2e 2e 2e 22 |y moves |back..."|
|00002b00| 20 22 54 68 69 73 20 69 | 73 20 61 20 64 72 61 77 | "This i|s a draw|
|00002b10| 2e 20 20 4a 75 73 74 20 | 63 68 61 6e 63 65 2c 20 |. Just |chance, |
|00002b20| 49 20 67 75 65 73 73 2e | 22 20 22 54 68 69 73 20 |I guess.|" "This |
|00002b30| 69 73 20 61 20 64 72 61 | 77 2e 20 4e 6f 77 2c 20 |is a dra|w. Now, |
|00002b40| 6c 65 74 20 6d 65 20 70 | 6c 61 79 20 66 69 72 73 |let me p|lay firs|
|00002b50| 74 20 6a 75 73 74 20 6f | 6e 63 65 2e 22 20 64 72 |t just o|nce." dr|
|00002b60| 61 77 2d 61 67 72 65 65 | 64 20 22 44 72 61 77 20 |aw-agree|d "Draw |
|00002b70| 61 67 72 65 65 64 2e 20 | 49 2c 20 66 6f 72 20 6f |agreed. |I, for o|
|00002b80| 6e 65 2c 20 6e 65 76 65 | 72 20 74 61 6b 65 20 6d |ne, neve|r take m|
|00002b90| 79 20 6d 6f 76 65 73 20 | 62 61 63 6b 2e 2e 2e 22 |y moves |back..."|
|00002ba0| 20 22 44 72 61 77 20 61 | 67 72 65 65 64 2e 20 59 | "Draw a|greed. Y|
|00002bb0| 6f 75 20 77 65 72 65 20 | 6c 75 63 6b 79 2e 22 20 |ou were |lucky." |
|00002bc0| 22 44 72 61 77 20 61 67 | 72 65 65 64 2e 20 4e 6f |"Draw ag|reed. No|
|00002bd0| 77 2c 20 6c 65 74 20 6d | 65 20 70 6c 61 79 20 66 |w, let m|e play f|
|00002be0| 69 72 73 74 20 6a 75 73 | 74 20 6f 6e 63 65 2e 22 |irst jus|t once."|
|00002bf0| 20 63 72 61 73 68 2d 67 | 61 6d 65 20 22 53 6f 72 | crash-g|ame "Sor|
|00002c00| 72 79 2c 20 49 20 68 61 | 76 65 20 62 65 65 6e 20 |ry, I ha|ve been |
|00002c10| 69 6e 74 65 72 72 75 70 | 74 65 64 20 61 6e 64 20 |interrup|ted and |
|00002c20| 63 61 6e 6e 6f 74 20 72 | 65 73 75 6d 65 20 74 68 |cannot r|esume th|
|00002c30| 61 74 20 67 61 6d 65 2e | 2e 2e 22 20 67 6f 6d 6f |at game.|.." gomo|
|00002c40| 6b 75 2d 64 69 73 70 6c | 61 79 2d 73 74 61 74 69 |ku-displ|ay-stati|
|00002c50| 73 74 69 63 73 20 64 69 | 6e 67 20 67 6f 6d 6f 6b |stics di|ng gomok|
|00002c60| 75 2d 67 61 6d 65 2d 69 | 6e 2d 70 72 6f 67 72 65 |u-game-i|n-progre|
|00002c70| 73 73 5d 20 32 20 28 23 | 24 20 2e 20 39 39 38 34 |ss] 2 (#|$ . 9984|
|00002c80| 29 5d 29 0a 23 40 35 36 | 20 57 68 61 74 20 74 6f |)]).#@56| What to|
|00002c90| 20 64 6f 20 77 68 65 6e | 20 45 6d 61 63 73 20 64 | do when| Emacs d|
|00002ca0| 65 74 65 63 74 73 20 69 | 74 20 68 61 73 20 62 65 |etects i|t has be|
|00002cb0| 65 6e 20 69 6e 74 65 72 | 72 75 70 74 65 64 2e 1f |en inter|rupted..|
|00002cc0| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 67 6f 6d 6f |.(defali|as 'gomo|
|00002cd0| 6b 75 2d 63 72 61 73 68 | 2d 67 61 6d 65 20 23 5b |ku-crash|-game #[|
|00002ce0| 6e 69 6c 20 22 c0 11 c2 | c3 21 88 c4 c5 21 88 c6 |nil "...|.!...!..|
|00002cf0| 20 87 22 20 5b 6e 69 6c | 20 67 6f 6d 6f 6b 75 2d | ." [nil| gomoku-|
|00002d00| 65 6d 61 63 73 2d 69 73 | 2d 63 6f 6d 70 75 74 69 |emacs-is|-computi|
|00002d10| 6e 67 20 67 6f 6d 6f 6b | 75 2d 74 65 72 6d 69 6e |ng gomok|u-termin|
|00002d20| 61 74 65 2d 67 61 6d 65 | 20 63 72 61 73 68 2d 67 |ate-game| crash-g|
|00002d30| 61 6d 65 20 73 69 74 2d | 66 6f 72 20 34 20 67 6f |ame sit-|for 4 go|
|00002d40| 6d 6f 6b 75 2d 70 72 6f | 6d 70 74 2d 66 6f 72 2d |moku-pro|mpt-for-|
|00002d50| 6f 74 68 65 72 2d 67 61 | 6d 65 5d 20 32 20 28 23 |other-ga|me] 2 (#|
|00002d60| 24 20 2e 20 31 31 34 30 | 31 29 5d 29 0a 23 40 35 |$ . 1140|1)]).#@5|
|00002d70| 31 33 20 53 74 61 72 74 | 20 61 20 47 6f 6d 6f 6b |13 Start| a Gomok|
|00002d80| 75 20 67 61 6d 65 20 62 | 65 74 77 65 65 6e 20 79 |u game b|etween y|
|00002d90| 6f 75 20 61 6e 64 20 45 | 6d 61 63 73 2e 0a 49 66 |ou and E|macs..If|
|00002da0| 20 61 20 67 61 6d 65 20 | 69 73 20 69 6e 20 70 72 | a game |is in pr|
|00002db0| 6f 67 72 65 73 73 2c 20 | 74 68 69 73 20 63 6f 6d |ogress, |this com|
|00002dc0| 6d 61 6e 64 20 61 6c 6c | 6f 77 20 79 6f 75 20 74 |mand all|ow you t|
|00002dd0| 6f 20 72 65 73 75 6d 65 | 20 69 74 2e 0a 49 66 20 |o resume| it..If |
|00002de0| 6f 70 74 69 6f 6e 61 6c | 20 61 72 67 75 6d 65 6e |optional| argumen|
|00002df0| 74 73 20 4e 20 61 6e 64 | 20 4d 20 61 72 65 20 67 |ts N and| M are g|
|00002e00| 69 76 65 6e 2c 20 61 6e | 20 4e 20 62 79 20 4d 20 |iven, an| N by M |
|00002e10| 62 6f 61 72 64 20 69 73 | 20 75 73 65 64 2e 0a 0a |board is| used...|
|00002e20| 59 6f 75 20 61 6e 64 20 | 45 6d 61 63 73 20 70 6c |You and |Emacs pl|
|00002e30| 61 79 20 69 6e 20 74 75 | 72 6e 20 62 79 20 6d 61 |ay in tu|rn by ma|
|00002e40| 72 6b 69 6e 67 20 61 20 | 66 72 65 65 20 73 71 75 |rking a |free squ|
|00002e50| 61 72 65 2e 20 59 6f 75 | 20 6d 61 72 6b 20 69 74 |are. You| mark it|
|00002e60| 20 77 69 74 68 20 58 0a | 61 6e 64 20 45 6d 61 63 | with X.|and Emac|
|00002e70| 73 20 6d 61 72 6b 73 20 | 69 74 20 77 69 74 68 20 |s marks |it with |
|00002e80| 4f 2e 20 54 68 65 20 77 | 69 6e 6e 65 72 20 69 73 |O. The w|inner is|
|00002e90| 20 74 68 65 20 66 69 72 | 73 74 20 74 6f 20 67 65 | the fir|st to ge|
|00002ea0| 74 20 66 69 76 65 20 63 | 6f 6e 74 69 67 75 6f 75 |t five c|ontiguou|
|00002eb0| 73 0a 6d 61 72 6b 73 20 | 68 6f 72 69 7a 6f 6e 74 |s.marks |horizont|
|00002ec0| 61 6c 6c 79 2c 20 76 65 | 72 74 69 63 61 6c 6c 79 |ally, ve|rtically|
|00002ed0| 20 6f 72 20 69 6e 20 64 | 69 61 67 6f 6e 61 6c 2e | or in d|iagonal.|
|00002ee0| 0a 59 6f 75 20 70 6c 61 | 79 20 62 79 20 6d 6f 76 |.You pla|y by mov|
|00002ef0| 69 6e 67 20 74 68 65 20 | 63 75 72 73 6f 72 20 6f |ing the |cursor o|
|00002f00| 76 65 72 20 74 68 65 20 | 73 71 75 61 72 65 20 79 |ver the |square y|
|00002f10| 6f 75 20 63 68 6f 6f 73 | 65 20 61 6e 64 20 68 69 |ou choos|e and hi|
|00002f20| 74 74 69 6e 67 0a 5c 3c | 67 6f 6d 6f 6b 75 2d 6d |tting.\<|gomoku-m|
|00002f30| 6f 64 65 2d 6d 61 70 3e | 5c 5b 67 6f 6d 6f 6b 75 |ode-map>|\[gomoku|
|00002f40| 2d 68 75 6d 61 6e 2d 70 | 6c 61 79 73 5d 2e 0a 55 |-human-p|lays]..U|
|00002f50| 73 65 20 5c 5b 64 65 73 | 63 72 69 62 65 2d 6d 6f |se \[des|cribe-mo|
|00002f60| 64 65 5d 20 66 6f 72 20 | 6d 6f 72 65 20 69 6e 66 |de] for |more inf|
|00002f70| 6f 2e 1f 0a 28 64 65 66 | 61 6c 69 61 73 20 27 67 |o...(def|alias 'g|
|00002f80| 6f 6d 6f 6b 75 20 23 5b | 28 26 6f 70 74 69 6f 6e |omoku #[|(&option|
|00002f90| 61 6c 20 6e 20 6d 29 20 | 22 c0 20 88 09 ab 83 c2 |al n m) |". .....|
|00002fa0| 20 87 0b ac ef c4 20 c5 | 20 1e 06 1e 07 0e 08 ac | ..... .| .......|
|00002fb0| 84 0e 07 16 08 0e 09 ac | 84 0e 06 16 09 0e 08 ca |........|........|
|00002fc0| 57 ab 86 cb cc 21 88 aa | 99 0e 09 ca 57 ab 86 cb |W....!..|....W...|
|00002fd0| cd 21 88 aa 8d 0e 08 0e | 07 56 ab 86 cb ce 0e 08 |.!......|.V......|
|00002fe0| 5c 22 88 0e 09 0e 06 56 | ab 94 0e 09 0e 0f 6b ac |\".....V|......k.|
|00002ff0| 8d d0 d1 d2 0e 09 5c 22 | 21 ac 84 0e 06 16 09 2a |......\"|!......*|
|00003000| d3 d4 21 88 d5 0e 08 0e | 09 5c 22 88 d0 d6 21 ab |..!.....|.\"...!.|
|00003010| 83 d7 20 87 d8 20 87 d0 | d9 21 ab 83 d8 20 87 da |.. .. ..|.!... ..|
|00003020| 20 87 22 20 5b 67 6f 6d | 6f 6b 75 2d 73 77 69 74 | ." [gom|oku-swit|
|00003030| 63 68 2d 74 6f 2d 77 69 | 6e 64 6f 77 20 67 6f 6d |ch-to-wi|ndow gom|
|00003040| 6f 6b 75 2d 65 6d 61 63 | 73 2d 69 73 2d 63 6f 6d |oku-emac|s-is-com|
|00003050| 70 75 74 69 6e 67 20 67 | 6f 6d 6f 6b 75 2d 63 72 |puting g|omoku-cr|
|00003060| 61 73 68 2d 67 61 6d 65 | 20 67 6f 6d 6f 6b 75 2d |ash-game| gomoku-|
|00003070| 67 61 6d 65 2d 69 6e 2d | 70 72 6f 67 72 65 73 73 |game-in-|progress|
|00003080| 20 67 6f 6d 6f 6b 75 2d | 6d 61 78 2d 77 69 64 74 | gomoku-|max-widt|
|00003090| 68 20 67 6f 6d 6f 6b 75 | 2d 6d 61 78 2d 68 65 69 |h gomoku|-max-hei|
|000030a0| 67 68 74 20 6d 61 78 2d | 68 65 69 67 68 74 20 6d |ght max-|height m|
|000030b0| 61 78 2d 77 69 64 74 68 | 20 6e 20 6d 20 31 20 65 |ax-width| n m 1 e|
|000030c0| 72 72 6f 72 20 22 49 20 | 6e 65 65 64 20 61 74 20 |rror "I |need at |
|000030d0| 6c 65 61 73 74 20 31 20 | 63 6f 6c 75 6d 6e 22 20 |least 1 |column" |
|000030e0| 22 49 20 6e 65 65 64 20 | 61 74 20 6c 65 61 73 74 |"I need |at least|
|000030f0| 20 31 20 72 6f 77 22 20 | 22 49 20 63 61 6e 6e 6f | 1 row" |"I canno|
|00003100| 74 20 64 69 73 70 6c 61 | 79 20 25 64 20 63 6f 6c |t displa|y %d col|
|00003110| 75 6d 6e 73 20 69 6e 20 | 74 68 61 74 20 77 69 6e |umns in |that win|
|00003120| 64 6f 77 22 20 67 6f 6d | 6f 6b 75 2d 73 61 76 65 |dow" gom|oku-save|
|00003130| 64 2d 62 6f 61 72 64 2d | 68 65 69 67 68 74 20 79 |d-board-|height y|
|00003140| 2d 6f 72 2d 6e 2d 70 20 | 66 6f 72 6d 61 74 20 22 |-or-n-p |format "|
|00003150| 44 6f 20 79 6f 75 20 72 | 65 61 6c 6c 79 20 77 61 |Do you r|eally wa|
|00003160| 6e 74 20 25 64 20 72 6f | 77 73 20 22 20 6d 65 73 |nt %d ro|ws " mes|
|00003170| 73 61 67 65 20 22 4f 6e | 65 20 6d 6f 6d 65 6e 74 |sage "On|e moment|
|00003180| 2c 20 70 6c 65 61 73 65 | 2e 2e 2e 22 20 67 6f 6d |, please|..." gom|
|00003190| 6f 6b 75 2d 73 74 61 72 | 74 2d 67 61 6d 65 20 22 |oku-star|t-game "|
|000031a0| 44 6f 20 79 6f 75 20 61 | 6c 6c 6f 77 20 6d 65 20 |Do you a|llow me |
|000031b0| 74 6f 20 70 6c 61 79 20 | 66 69 72 73 74 20 22 20 |to play |first " |
|000031c0| 67 6f 6d 6f 6b 75 2d 65 | 6d 61 63 73 2d 70 6c 61 |gomoku-e|macs-pla|
|000031d0| 79 73 20 67 6f 6d 6f 6b | 75 2d 70 72 6f 6d 70 74 |ys gomok|u-prompt|
|000031e0| 2d 66 6f 72 2d 6d 6f 76 | 65 20 22 53 68 61 6c 6c |-for-mov|e "Shall|
|000031f0| 20 77 65 20 63 6f 6e 74 | 69 6e 75 65 20 6f 75 72 | we cont|inue our|
|00003200| 20 67 61 6d 65 20 22 20 | 67 6f 6d 6f 6b 75 2d 68 | game " |gomoku-h|
|00003210| 75 6d 61 6e 2d 72 65 73 | 69 67 6e 73 5d 20 34 20 |uman-res|igns] 4 |
|00003220| 28 23 24 20 2e 20 31 31 | 36 33 35 29 20 6e 69 6c |(#$ . 11|635) nil|
|00003230| 5d 29 0a 23 40 33 38 20 | 43 6f 6d 70 75 74 65 20 |]).#@38 |Compute |
|00003240| 45 6d 61 63 73 20 6e 65 | 78 74 20 6d 6f 76 65 20 |Emacs ne|xt move |
|00003250| 61 6e 64 20 70 6c 61 79 | 20 69 74 2e 1f 0a 28 64 |and play| it...(d|
|00003260| 65 66 61 6c 69 61 73 20 | 27 67 6f 6d 6f 6b 75 2d |efalias |'gomoku-|
|00003270| 65 6d 61 63 73 2d 70 6c | 61 79 73 20 23 5b 6e 69 |emacs-pl|ays #[ni|
|00003280| 6c 20 22 c0 20 88 09 ab | 83 c2 20 87 0b ac 83 c4 |l ". ...|.. .....|
|00003290| 20 87 c5 c6 21 88 c7 89 | 1e 08 1e 09 ca 20 89 16 | ...!...|..... ..|
|000032a0| 09 ac 85 cb cc 21 aa c3 | 0e 0d 0e 09 48 16 08 ce |.....!..|....H...|
|000032b0| 0e 09 cf 5c 22 88 0e 08 | 0e 10 59 ab 8e d1 0e 09 |...\"...|..Y.....|
|000032c0| cf 5c 22 88 d2 20 88 cb | d3 21 aa a1 0e 08 d4 55 |.\".. ..|.!.....U|
|000032d0| ab 85 cb cc 21 aa 96 0e | 15 0e 16 56 ab 8d 0e 17 |....!...|...V....|
|000032e0| ac 89 d8 20 ab 85 cb d9 | 21 aa 82 da 20 2a 87 22 |... ....|!... *."|
|000032f0| 20 5b 67 6f 6d 6f 6b 75 | 2d 73 77 69 74 63 68 2d | [gomoku|-switch-|
|00003300| 74 6f 2d 77 69 6e 64 6f | 77 20 67 6f 6d 6f 6b 75 |to-windo|w gomoku|
|00003310| 2d 65 6d 61 63 73 2d 69 | 73 2d 63 6f 6d 70 75 74 |-emacs-i|s-comput|
|00003320| 69 6e 67 20 67 6f 6d 6f | 6b 75 2d 63 72 61 73 68 |ing gomo|ku-crash|
|00003330| 2d 67 61 6d 65 20 67 6f | 6d 6f 6b 75 2d 67 61 6d |-game go|moku-gam|
|00003340| 65 2d 69 6e 2d 70 72 6f | 67 72 65 73 73 20 67 6f |e-in-pro|gress go|
|00003350| 6d 6f 6b 75 2d 70 72 6f | 6d 70 74 2d 66 6f 72 2d |moku-pro|mpt-for-|
|00003360| 6f 74 68 65 72 2d 67 61 | 6d 65 20 6d 65 73 73 61 |other-ga|me messa|
|00003370| 67 65 20 22 4c 65 74 20 | 6d 65 20 74 68 69 6e 6b |ge "Let |me think|
|00003380| 2e 2e 2e 22 20 6e 69 6c | 20 73 63 6f 72 65 20 73 |..." nil| score s|
|00003390| 71 75 61 72 65 20 67 6f | 6d 6f 6b 75 2d 73 74 72 |quare go|moku-str|
|000033a0| 6f 6e 67 65 73 74 2d 73 | 71 75 61 72 65 20 67 6f |ongest-s|quare go|
|000033b0| 6d 6f 6b 75 2d 74 65 72 | 6d 69 6e 61 74 65 2d 67 |moku-ter|minate-g|
|000033c0| 61 6d 65 20 6e 6f 62 6f | 64 79 2d 77 6f 6e 20 67 |ame nobo|dy-won g|
|000033d0| 6f 6d 6f 6b 75 2d 73 63 | 6f 72 65 2d 74 61 62 6c |omoku-sc|ore-tabl|
|000033e0| 65 20 67 6f 6d 6f 6b 75 | 2d 70 6c 61 79 2d 6d 6f |e gomoku|-play-mo|
|000033f0| 76 65 20 36 20 67 6f 6d | 6f 6b 75 2d 77 69 6e 6e |ve 6 gom|oku-winn|
|00003400| 69 6e 67 2d 74 68 72 65 | 73 68 6f 6c 64 20 67 6f |ing-thre|shold go|
|00003410| 6d 6f 6b 75 2d 66 69 6e | 64 2d 66 69 6c 6c 65 64 |moku-fin|d-filled|
|00003420| 2d 71 74 75 70 6c 65 20 | 67 6f 6d 6f 6b 75 2d 63 |-qtuple |gomoku-c|
|00003430| 72 6f 73 73 2d 77 69 6e | 6e 69 6e 67 2d 71 74 75 |ross-win|ning-qtu|
|00003440| 70 6c 65 20 65 6d 61 63 | 73 2d 77 6f 6e 20 30 20 |ple emac|s-won 0 |
|00003450| 67 6f 6d 6f 6b 75 2d 6e | 75 6d 62 65 72 2d 6f 66 |gomoku-n|umber-of|
|00003460| 2d 6d 6f 76 65 73 20 67 | 6f 6d 6f 6b 75 2d 64 72 |-moves g|omoku-dr|
|00003470| 61 77 2d 6c 69 6d 69 74 | 20 67 6f 6d 6f 6b 75 2d |aw-limit| gomoku-|
|00003480| 68 75 6d 61 6e 2d 72 65 | 66 75 73 65 64 2d 64 72 |human-re|fused-dr|
|00003490| 61 77 20 67 6f 6d 6f 6b | 75 2d 6f 66 66 65 72 2d |aw gomok|u-offer-|
|000034a0| 61 2d 64 72 61 77 20 64 | 72 61 77 2d 61 67 72 65 |a-draw d|raw-agre|
|000034b0| 65 64 20 67 6f 6d 6f 6b | 75 2d 70 72 6f 6d 70 74 |ed gomok|u-prompt|
|000034c0| 2d 66 6f 72 2d 6d 6f 76 | 65 5d 20 34 20 28 23 24 |-for-mov|e] 4 (#$|
|000034d0| 20 2e 20 31 32 38 35 36 | 29 20 6e 69 6c 5d 29 0a | . 12856|) nil]).|
|000034e0| 23 40 33 37 20 50 6c 61 | 79 20 61 74 20 74 68 65 |#@37 Pla|y at the|
|000034f0| 20 73 71 75 61 72 65 20 | 77 68 65 72 65 20 79 6f | square |where yo|
|00003500| 75 20 63 6c 69 63 6b 2e | 1f 0a 28 64 65 66 61 6c |u click.|..(defal|
|00003510| 69 61 73 20 27 67 6f 6d | 6f 6b 75 2d 63 6c 69 63 |ias 'gom|oku-clic|
|00003520| 6b 20 23 5b 28 63 6c 69 | 63 6b 29 20 22 c0 09 21 |k #[(cli|ck) "..!|
|00003530| 88 c2 20 87 22 20 5b 6d | 6f 75 73 65 2d 73 65 74 |.. ." [m|ouse-set|
|00003540| 2d 70 6f 69 6e 74 20 63 | 6c 69 63 6b 20 67 6f 6d |-point c|lick gom|
|00003550| 6f 6b 75 2d 68 75 6d 61 | 6e 2d 70 6c 61 79 73 5d |oku-huma|n-plays]|
|00003560| 20 32 20 28 23 24 20 2e | 20 31 33 35 34 31 29 20 | 2 (#$ .| 13541) |
|00003570| 22 65 22 5d 29 0a 23 40 | 31 38 34 20 53 69 67 6e |"e"]).#@|184 Sign|
|00003580| 61 6c 20 74 6f 20 74 68 | 65 20 47 6f 6d 6f 6b 75 |al to th|e Gomoku|
|00003590| 20 70 72 6f 67 72 61 6d | 20 74 68 61 74 20 79 6f | program| that yo|
|000035a0| 75 20 68 61 76 65 20 70 | 6c 61 79 65 64 2e 0a 59 |u have p|layed..Y|
|000035b0| 6f 75 20 6d 75 73 74 20 | 68 61 76 65 20 70 75 74 |ou must |have put|
|000035c0| 20 74 68 65 20 63 75 72 | 73 6f 72 20 6f 6e 20 74 | the cur|sor on t|
|000035d0| 68 65 20 73 71 75 61 72 | 65 20 77 68 65 72 65 20 |he squar|e where |
|000035e0| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 70 6c 61 79 |you want| to play|
|000035f0| 2e 0a 49 66 20 74 68 65 | 20 67 61 6d 65 20 69 73 |..If the| game is|
|00003600| 20 66 69 6e 69 73 68 65 | 64 2c 20 74 68 69 73 20 | finishe|d, this |
|00003610| 63 6f 6d 6d 61 6e 64 20 | 72 65 71 75 65 73 74 73 |command |requests|
|00003620| 20 66 6f 72 20 61 6e 6f | 74 68 65 72 20 67 61 6d | for ano|ther gam|
|00003630| 65 2e 1f 0a 28 64 65 66 | 61 6c 69 61 73 20 27 67 |e...(def|alias 'g|
|00003640| 6f 6d 6f 6b 75 2d 68 75 | 6d 61 6e 2d 70 6c 61 79 |omoku-hu|man-play|
|00003650| 73 20 23 5b 6e 69 6c 20 | 22 c0 20 88 09 ab 83 c2 |s #[nil |". .....|
|00003660| 20 87 0b ac 83 c4 20 87 | c5 89 1e 06 1e 07 c8 20 | ..... .|....... |
|00003670| 89 16 07 ac 85 c9 ca 21 | aa b3 0e 0b 0e 07 48 cc |.......!|......H.|
|00003680| 55 ac 85 c9 cd 21 aa a5 | 0e 0e 0e 07 48 16 06 cf |U....!..|....H...|
|00003690| 0e 07 d0 5c 22 88 0e 06 | 0e 11 59 ab 8f d2 0e 07 |...\"...|..Y.....|
|000036a0| d0 5c 22 ab 88 d3 20 88 | d4 d5 21 aa 82 d6 20 2a |.\"... .|..!... *|
|000036b0| 87 22 20 5b 67 6f 6d 6f | 6b 75 2d 73 77 69 74 63 |." [gomo|ku-switc|
|000036c0| 68 2d 74 6f 2d 77 69 6e | 64 6f 77 20 67 6f 6d 6f |h-to-win|dow gomo|
|000036d0| 6b 75 2d 65 6d 61 63 73 | 2d 69 73 2d 63 6f 6d 70 |ku-emacs|-is-comp|
|000036e0| 75 74 69 6e 67 20 67 6f | 6d 6f 6b 75 2d 63 72 61 |uting go|moku-cra|
|000036f0| 73 68 2d 67 61 6d 65 20 | 67 6f 6d 6f 6b 75 2d 67 |sh-game |gomoku-g|
|00003700| 61 6d 65 2d 69 6e 2d 70 | 72 6f 67 72 65 73 73 20 |ame-in-p|rogress |
|00003710| 67 6f 6d 6f 6b 75 2d 70 | 72 6f 6d 70 74 2d 66 6f |gomoku-p|rompt-fo|
|00003720| 72 2d 6f 74 68 65 72 2d | 67 61 6d 65 20 6e 69 6c |r-other-|game nil|
|00003730| 20 73 63 6f 72 65 20 73 | 71 75 61 72 65 20 67 6f | score s|quare go|
|00003740| 6d 6f 6b 75 2d 70 6f 69 | 6e 74 2d 73 71 75 61 72 |moku-poi|nt-squar|
|00003750| 65 20 65 72 72 6f 72 20 | 22 59 6f 75 72 20 70 6f |e error |"Your po|
|00003760| 69 6e 74 20 69 73 20 6e | 6f 74 20 6f 6e 20 61 20 |int is n|ot on a |
|00003770| 73 71 75 61 72 65 2e 20 | 52 65 74 72 79 20 21 22 |square. |Retry !"|
|00003780| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 20 30 20 | gomoku-|board 0 |
|00003790| 22 59 6f 75 72 20 70 6f | 69 6e 74 20 69 73 20 6e |"Your po|int is n|
|000037a0| 6f 74 20 6f 6e 20 61 20 | 66 72 65 65 20 73 71 75 |ot on a |free squ|
|000037b0| 61 72 65 2e 20 52 65 74 | 72 79 20 21 22 20 67 6f |are. Ret|ry !" go|
|000037c0| 6d 6f 6b 75 2d 73 63 6f | 72 65 2d 74 61 62 6c 65 |moku-sco|re-table|
|000037d0| 20 67 6f 6d 6f 6b 75 2d | 70 6c 61 79 2d 6d 6f 76 | gomoku-|play-mov|
|000037e0| 65 20 31 20 67 6f 6d 6f | 6b 75 2d 6c 6f 6f 73 69 |e 1 gomo|ku-loosi|
|000037f0| 6e 67 2d 74 68 72 65 73 | 68 6f 6c 64 20 67 6f 6d |ng-thres|hold gom|
|00003800| 6f 6b 75 2d 66 69 6e 64 | 2d 66 69 6c 6c 65 64 2d |oku-find|-filled-|
|00003810| 71 74 75 70 6c 65 20 67 | 6f 6d 6f 6b 75 2d 63 72 |qtuple g|omoku-cr|
|00003820| 6f 73 73 2d 77 69 6e 6e | 69 6e 67 2d 71 74 75 70 |oss-winn|ing-qtup|
|00003830| 6c 65 20 67 6f 6d 6f 6b | 75 2d 74 65 72 6d 69 6e |le gomok|u-termin|
|00003840| 61 74 65 2d 67 61 6d 65 | 20 68 75 6d 61 6e 2d 77 |ate-game| human-w|
|00003850| 6f 6e 20 67 6f 6d 6f 6b | 75 2d 65 6d 61 63 73 2d |on gomok|u-emacs-|
|00003860| 70 6c 61 79 73 5d 20 34 | 20 28 23 24 20 2e 20 31 |plays] 4| (#$ . 1|
|00003870| 33 36 39 32 29 20 6e 69 | 6c 5d 29 0a 23 40 37 33 |3692) ni|l]).#@73|
|00003880| 20 53 69 67 6e 61 6c 20 | 74 6f 20 74 68 65 20 47 | Signal |to the G|
|00003890| 6f 6d 6f 6b 75 20 70 72 | 6f 67 72 61 6d 20 74 68 |omoku pr|ogram th|
|000038a0| 61 74 20 79 6f 75 20 77 | 69 73 68 20 74 6f 20 74 |at you w|ish to t|
|000038b0| 61 6b 65 20 62 61 63 6b | 20 79 6f 75 72 20 6c 61 |ake back| your la|
|000038c0| 73 74 20 6d 6f 76 65 2e | 1f 0a 28 64 65 66 61 6c |st move.|..(defal|
|000038d0| 69 61 73 20 27 67 6f 6d | 6f 6b 75 2d 68 75 6d 61 |ias 'gom|oku-huma|
|000038e0| 6e 2d 74 61 6b 65 73 2d | 62 61 63 6b 20 23 5b 6e |n-takes-|back #[n|
|000038f0| 69 6c 20 22 c0 20 88 09 | ab 83 c2 20 87 0b ac 8b |il ". ..|... ....|
|00003900| c4 c5 21 88 c6 c7 21 88 | c8 20 87 0e 09 ca 55 ab |..!...!.|. ....U.|
|00003910| 84 c4 cb 21 87 c4 cc 21 | 88 cd 16 0e 0e 09 1e 0f |...!...!|........|
|00003920| 0e 0f 0e 09 55 ab 85 d0 | 20 88 aa 74 29 d1 20 87 |....U...| ..t). .|
|00003930| 22 20 5b 67 6f 6d 6f 6b | 75 2d 73 77 69 74 63 68 |" [gomok|u-switch|
|00003940| 2d 74 6f 2d 77 69 6e 64 | 6f 77 20 67 6f 6d 6f 6b |-to-wind|ow gomok|
|00003950| 75 2d 65 6d 61 63 73 2d | 69 73 2d 63 6f 6d 70 75 |u-emacs-|is-compu|
|00003960| 74 69 6e 67 20 67 6f 6d | 6f 6b 75 2d 63 72 61 73 |ting gom|oku-cras|
|00003970| 68 2d 67 61 6d 65 20 67 | 6f 6d 6f 6b 75 2d 67 61 |h-game g|omoku-ga|
|00003980| 6d 65 2d 69 6e 2d 70 72 | 6f 67 72 65 73 73 20 6d |me-in-pr|ogress m|
|00003990| 65 73 73 61 67 65 20 22 | 54 6f 6f 20 6c 61 74 65 |essage "|Too late|
|000039a0| 20 66 6f 72 20 74 61 6b | 69 6e 67 20 62 61 63 6b | for tak|ing back|
|000039b0| 2e 2e 2e 22 20 73 69 74 | 2d 66 6f 72 20 34 20 67 |..." sit|-for 4 g|
|000039c0| 6f 6d 6f 6b 75 2d 70 72 | 6f 6d 70 74 2d 66 6f 72 |omoku-pr|ompt-for|
|000039d0| 2d 6f 74 68 65 72 2d 67 | 61 6d 65 20 67 6f 6d 6f |-other-g|ame gomo|
|000039e0| 6b 75 2d 6e 75 6d 62 65 | 72 2d 6f 66 2d 68 75 6d |ku-numbe|r-of-hum|
|000039f0| 61 6e 2d 6d 6f 76 65 73 | 20 30 20 22 59 6f 75 20 |an-moves| 0 "You |
|00003a00| 68 61 76 65 20 6e 6f 74 | 20 70 6c 61 79 65 64 20 |have not| played |
|00003a10| 79 65 74 2e 2e 2e 20 59 | 6f 75 72 20 6d 6f 76 65 |yet... Y|our move|
|00003a20| 20 3f 22 20 22 4f 6e 65 | 20 6d 6f 6d 65 6e 74 2c | ?" "One| moment,|
|00003a30| 20 70 6c 65 61 73 65 2e | 2e 2e 22 20 74 20 67 6f | please.|.." t go|
|00003a40| 6d 6f 6b 75 2d 68 75 6d | 61 6e 2d 74 6f 6f 6b 2d |moku-hum|an-took-|
|00003a50| 62 61 63 6b 20 6e 75 6d | 62 65 72 20 67 6f 6d 6f |back num|ber gomo|
|00003a60| 6b 75 2d 74 61 6b 65 2d | 62 61 63 6b 20 67 6f 6d |ku-take-|back gom|
|00003a70| 6f 6b 75 2d 70 72 6f 6d | 70 74 2d 66 6f 72 2d 6d |oku-prom|pt-for-m|
|00003a80| 6f 76 65 5d 20 32 20 28 | 23 24 20 2e 20 31 34 34 |ove] 2 (|#$ . 144|
|00003a90| 36 35 29 20 6e 69 6c 5d | 29 0a 23 40 35 39 20 53 |65) nil]|).#@59 S|
|00003aa0| 69 67 6e 61 6c 20 74 6f | 20 74 68 65 20 47 6f 6d |ignal to| the Gom|
|00003ab0| 6f 6b 75 20 70 72 6f 67 | 72 61 6d 20 74 68 61 74 |oku prog|ram that|
|00003ac0| 20 79 6f 75 20 6d 61 79 | 20 77 61 6e 74 20 74 6f | you may| want to|
|00003ad0| 20 72 65 73 69 67 6e 2e | 1f 0a 28 64 65 66 61 6c | resign.|..(defal|
|00003ae0| 69 61 73 20 27 67 6f 6d | 6f 6b 75 2d 68 75 6d 61 |ias 'gom|oku-huma|
|00003af0| 6e 2d 72 65 73 69 67 6e | 73 20 23 5b 6e 69 6c 20 |n-resign|s #[nil |
|00003b00| 22 c0 20 88 09 ab 83 c2 | 20 87 0b ac 84 c4 c5 21 |". .....| ......!|
|00003b10| 87 c6 c7 21 ab 84 c8 c9 | 21 87 c6 ca 21 ab 83 cb |...!....|!...!...|
|00003b20| 20 87 c8 c9 21 87 22 20 | 5b 67 6f 6d 6f 6b 75 2d | ...!." |[gomoku-|
|00003b30| 73 77 69 74 63 68 2d 74 | 6f 2d 77 69 6e 64 6f 77 |switch-t|o-window|
|00003b40| 20 67 6f 6d 6f 6b 75 2d | 65 6d 61 63 73 2d 69 73 | gomoku-|emacs-is|
|00003b50| 2d 63 6f 6d 70 75 74 69 | 6e 67 20 67 6f 6d 6f 6b |-computi|ng gomok|
|00003b60| 75 2d 63 72 61 73 68 2d | 67 61 6d 65 20 67 6f 6d |u-crash-|game gom|
|00003b70| 6f 6b 75 2d 67 61 6d 65 | 2d 69 6e 2d 70 72 6f 67 |oku-game|-in-prog|
|00003b80| 72 65 73 73 20 6d 65 73 | 73 61 67 65 20 22 54 68 |ress mes|sage "Th|
|00003b90| 65 72 65 20 69 73 20 6e | 6f 20 67 61 6d 65 20 69 |ere is n|o game i|
|00003ba0| 6e 20 70 72 6f 67 72 65 | 73 73 22 20 79 2d 6f 72 |n progre|ss" y-or|
|00003bb0| 2d 6e 2d 70 20 22 59 6f | 75 20 6d 65 61 6e 2c 20 |-n-p "Yo|u mean, |
|00003bc0| 79 6f 75 20 72 65 73 69 | 67 6e 20 22 20 67 6f 6d |you resi|gn " gom|
|00003bd0| 6f 6b 75 2d 74 65 72 6d | 69 6e 61 74 65 2d 67 61 |oku-term|inate-ga|
|00003be0| 6d 65 20 68 75 6d 61 6e | 2d 72 65 73 69 67 6e 65 |me human|-resigne|
|00003bf0| 64 20 22 59 6f 75 20 6d | 65 61 6e 2c 20 77 65 20 |d "You m|ean, we |
|00003c00| 63 6f 6e 74 69 6e 75 65 | 20 22 20 67 6f 6d 6f 6b |continue| " gomok|
|00003c10| 75 2d 70 72 6f 6d 70 74 | 2d 66 6f 72 2d 6d 6f 76 |u-prompt|-for-mov|
|00003c20| 65 5d 20 32 20 28 23 24 | 20 2e 20 31 35 30 30 37 |e] 2 (#$| . 15007|
|00003c30| 29 20 6e 69 6c 5d 29 0a | 23 40 34 34 20 44 69 73 |) nil]).|#@44 Dis|
|00003c40| 70 6c 61 79 20 61 20 6d | 65 73 73 61 67 65 20 61 |play a m|essage a|
|00003c50| 73 6b 69 6e 67 20 66 6f | 72 20 48 75 6d 61 6e 27 |sking fo|r Human'|
|00003c60| 73 20 6d 6f 76 65 2e 1f | 0a 28 64 65 66 61 6c 69 |s move..|.(defali|
|00003c70| 61 73 20 27 67 6f 6d 6f | 6b 75 2d 70 72 6f 6d 70 |as 'gomo|ku-promp|
|00003c80| 74 2d 66 6f 72 2d 6d 6f | 76 65 20 23 5b 6e 69 6c |t-for-mo|ve #[nil|
|00003c90| 20 22 c0 09 c2 55 ab 83 | c3 aa 81 c4 21 88 8a c5 | "...U..|....!...|
|00003ca0| 20 71 29 87 22 20 5b 6d | 65 73 73 61 67 65 20 67 | q)." [m|essage g|
|00003cb0| 6f 6d 6f 6b 75 2d 6e 75 | 6d 62 65 72 2d 6f 66 2d |omoku-nu|mber-of-|
|00003cc0| 68 75 6d 61 6e 2d 6d 6f | 76 65 73 20 30 20 22 59 |human-mo|ves 0 "Y|
|00003cd0| 6f 75 72 20 6d 6f 76 65 | 20 3f 20 28 6d 6f 76 65 |our move| ? (move|
|00003ce0| 20 74 6f 20 61 20 66 72 | 65 65 20 73 71 75 61 72 | to a fr|ee squar|
|00003cf0| 65 20 61 6e 64 20 68 69 | 74 20 58 2c 20 52 45 54 |e and hi|t X, RET|
|00003d00| 20 2e 2e 2e 29 22 20 22 | 59 6f 75 72 20 6d 6f 76 | ...)" "|Your mov|
|00003d10| 65 20 3f 22 20 6f 74 68 | 65 72 2d 62 75 66 66 65 |e ?" oth|er-buffe|
|00003d20| 72 5d 20 33 20 28 23 24 | 20 2e 20 31 35 34 32 31 |r] 3 (#$| . 15421|
|00003d30| 29 5d 29 0a 23 40 33 37 | 20 41 73 6b 20 66 6f 72 |)]).#@37| Ask for|
|00003d40| 20 61 6e 6f 74 68 65 72 | 20 67 61 6d 65 2c 20 61 | another| game, a|
|00003d50| 6e 64 20 73 74 61 72 74 | 20 69 74 2e 1f 0a 28 64 |nd start| it...(d|
|00003d60| 65 66 61 6c 69 61 73 20 | 27 67 6f 6d 6f 6b 75 2d |efalias |'gomoku-|
|00003d70| 70 72 6f 6d 70 74 2d 66 | 6f 72 2d 6f 74 68 65 72 |prompt-f|or-other|
|00003d80| 2d 67 61 6d 65 20 23 5b | 6e 69 6c 20 22 c0 c1 21 |-game #[|nil "..!|
|00003d90| ab 85 c2 0b 0c 5c 22 87 | c5 c6 21 87 22 20 5b 79 |.....\".|..!." [y|
|00003da0| 2d 6f 72 2d 6e 2d 70 20 | 22 41 6e 6f 74 68 65 72 |-or-n-p |"Another|
|00003db0| 20 67 61 6d 65 20 22 20 | 67 6f 6d 6f 6b 75 20 67 | game " |gomoku g|
|00003dc0| 6f 6d 6f 6b 75 2d 62 6f | 61 72 64 2d 77 69 64 74 |omoku-bo|ard-widt|
|00003dd0| 68 20 67 6f 6d 6f 6b 75 | 2d 62 6f 61 72 64 2d 68 |h gomoku|-board-h|
|00003de0| 65 69 67 68 74 20 6d 65 | 73 73 61 67 65 20 22 43 |eight me|ssage "C|
|00003df0| 68 69 63 6b 65 6e 20 21 | 22 5d 20 33 20 28 23 24 |hicken !|"] 3 (#$|
|00003e00| 20 2e 20 31 35 36 37 33 | 29 5d 29 0a 23 40 34 39 | . 15673|)]).#@49|
|00003e10| 20 4f 66 66 65 72 20 61 | 20 64 72 61 77 20 61 6e | Offer a| draw an|
|00003e20| 64 20 72 65 74 75 72 6e | 20 54 20 69 66 20 48 75 |d return| T if Hu|
|00003e30| 6d 61 6e 20 61 63 63 65 | 70 74 65 64 20 69 74 2e |man acce|pted it.|
|00003e40| 1f 0a 28 64 65 66 61 6c | 69 61 73 20 27 67 6f 6d |..(defal|ias 'gom|
|00003e50| 6f 6b 75 2d 6f 66 66 65 | 72 2d 61 2d 64 72 61 77 |oku-offe|r-a-draw|
|00003e60| 20 23 5b 6e 69 6c 20 22 | c0 c1 21 ae 83 c2 89 13 | #[nil "|..!.....|
|00003e70| 87 22 20 5b 79 2d 6f 72 | 2d 6e 2d 70 20 22 49 20 |." [y-or|-n-p "I |
|00003e80| 6f 66 66 65 72 20 79 6f | 75 20 61 20 64 72 61 77 |offer yo|u a draw|
|00003e90| 2e 20 44 6f 20 79 6f 75 | 20 61 63 63 65 70 74 20 |. Do you| accept |
|00003ea0| 69 74 20 22 20 74 20 67 | 6f 6d 6f 6b 75 2d 68 75 |it " t g|omoku-hu|
|00003eb0| 6d 61 6e 2d 72 65 66 75 | 73 65 64 2d 64 72 61 77 |man-refu|sed-draw|
|00003ec0| 5d 20 32 20 28 23 24 20 | 2e 20 31 35 38 38 39 29 |] 2 (#$ |. 15889)|
|00003ed0| 5d 29 0a 23 40 35 38 20 | 2a 48 6f 72 69 7a 6f 6e |]).#@58 |*Horizon|
|00003ee0| 74 61 6c 20 73 70 61 63 | 69 6e 67 20 62 65 74 77 |tal spac|ing betw|
|00003ef0| 65 65 6e 20 73 71 75 61 | 72 65 73 20 6f 6e 20 74 |een squa|res on t|
|00003f00| 68 65 20 47 6f 6d 6f 6b | 75 20 62 6f 61 72 64 2e |he Gomok|u board.|
|00003f10| 1f 0a 28 64 65 66 63 6f | 6e 73 74 20 67 6f 6d 6f |..(defco|nst gomo|
|00003f20| 6b 75 2d 73 71 75 61 72 | 65 2d 77 69 64 74 68 20 |ku-squar|e-width |
|00003f30| 34 20 28 23 24 20 2e 20 | 2d 31 36 30 38 38 29 29 |4 (#$ . |-16088))|
|00003f40| 0a 23 40 35 36 20 2a 56 | 65 72 74 69 63 61 6c 20 |.#@56 *V|ertical |
|00003f50| 73 70 61 63 69 6e 67 20 | 62 65 74 77 65 65 6e 20 |spacing |between |
|00003f60| 73 71 75 61 72 65 73 20 | 6f 6e 20 74 68 65 20 47 |squares |on the G|
|00003f70| 6f 6d 6f 6b 75 20 62 6f | 61 72 64 2e 1f 0a 28 64 |omoku bo|ard...(d|
|00003f80| 65 66 63 6f 6e 73 74 20 | 67 6f 6d 6f 6b 75 2d 73 |efconst |gomoku-s|
|00003f90| 71 75 61 72 65 2d 68 65 | 69 67 68 74 20 32 20 28 |quare-he|ight 2 (|
|00003fa0| 23 24 20 2e 20 2d 31 36 | 31 39 38 29 29 0a 23 40 |#$ . -16|198)).#@|
|00003fb0| 37 33 20 2a 4e 75 6d 62 | 65 72 20 6f 66 20 63 6f |73 *Numb|er of co|
|00003fc0| 6c 75 6d 6e 73 20 62 65 | 74 77 65 65 6e 20 74 68 |lumns be|tween th|
|00003fd0| 65 20 47 6f 6d 6f 6b 75 | 20 62 6f 61 72 64 20 61 |e Gomoku| board a|
|00003fe0| 6e 64 20 74 68 65 20 73 | 69 64 65 20 6f 66 20 74 |nd the s|ide of t|
|00003ff0| 68 65 20 77 69 6e 64 6f | 77 2e 1f 0a 28 64 65 66 |he windo|w...(def|
|00004000| 63 6f 6e 73 74 20 67 6f | 6d 6f 6b 75 2d 78 2d 6f |const go|moku-x-o|
|00004010| 66 66 73 65 74 20 33 20 | 28 23 24 20 2e 20 2d 31 |ffset 3 |(#$ . -1|
|00004020| 36 33 30 37 29 29 0a 23 | 40 37 30 20 2a 4e 75 6d |6307)).#|@70 *Num|
|00004030| 62 65 72 20 6f 66 20 6c | 69 6e 65 73 20 62 65 74 |ber of l|ines bet|
|00004040| 77 65 65 6e 20 74 68 65 | 20 47 6f 6d 6f 6b 75 20 |ween the| Gomoku |
|00004050| 62 6f 61 72 64 20 61 6e | 64 20 74 68 65 20 74 6f |board an|d the to|
|00004060| 70 20 6f 66 20 74 68 65 | 20 77 69 6e 64 6f 77 2e |p of the| window.|
|00004070| 1f 0a 28 64 65 66 63 6f | 6e 73 74 20 67 6f 6d 6f |..(defco|nst gomo|
|00004080| 6b 75 2d 79 2d 6f 66 66 | 73 65 74 20 31 20 28 23 |ku-y-off|set 1 (#|
|00004090| 24 20 2e 20 2d 31 36 34 | 32 38 29 29 0a 23 40 35 |$ . -164|28)).#@5|
|000040a0| 34 20 4c 61 72 67 65 73 | 74 20 70 6f 73 73 69 62 |4 Larges|t possib|
|000040b0| 6c 65 20 62 6f 61 72 64 | 20 77 69 64 74 68 20 66 |le board| width f|
|000040c0| 6f 72 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 77 |or the c|urrent w|
|000040d0| 69 6e 64 6f 77 2e 1f 0a | 28 64 65 66 61 6c 69 61 |indow...|(defalia|
|000040e0| 73 20 27 67 6f 6d 6f 6b | 75 2d 6d 61 78 2d 77 69 |s 'gomok|u-max-wi|
|000040f0| 64 74 68 20 23 5b 6e 69 | 6c 20 22 c0 c1 20 21 5c |dth #[ni|l ".. !\|
|00004100| 6e 5a 5c 6e 5a c3 5a 0c | a5 54 87 22 20 5b 77 69 |nZ\nZ.Z.|.T." [wi|
|00004110| 6e 64 6f 77 2d 77 69 64 | 74 68 20 73 65 6c 65 63 |ndow-wid|th selec|
|00004120| 74 65 64 2d 77 69 6e 64 | 6f 77 20 67 6f 6d 6f 6b |ted-wind|ow gomok|
|00004130| 75 2d 78 2d 6f 66 66 73 | 65 74 20 31 20 67 6f 6d |u-x-offs|et 1 gom|
|00004140| 6f 6b 75 2d 73 71 75 61 | 72 65 2d 77 69 64 74 68 |oku-squa|re-width|
|00004150| 5d 20 32 20 28 23 24 20 | 2e 20 31 36 35 34 36 29 |] 2 (#$ |. 16546)|
|00004160| 5d 29 0a 23 40 35 35 20 | 4c 61 72 67 65 73 74 20 |]).#@55 |Largest |
|00004170| 70 6f 73 73 69 62 6c 65 | 20 62 6f 61 72 64 20 68 |possible| board h|
|00004180| 65 69 67 68 74 20 66 6f | 72 20 74 68 65 20 63 75 |eight fo|r the cu|
|00004190| 72 72 65 6e 74 20 77 69 | 6e 64 6f 77 2e 1f 0a 28 |rrent wi|ndow...(|
|000041a0| 64 65 66 61 6c 69 61 73 | 20 27 67 6f 6d 6f 6b 75 |defalias| 'gomoku|
|000041b0| 2d 6d 61 78 2d 68 65 69 | 67 68 74 20 23 5b 6e 69 |-max-hei|ght #[ni|
|000041c0| 6c 20 22 c0 c1 20 21 5c | 6e 5a 5c 6e 5a c3 5a 0c |l ".. !\|nZ\nZ.Z.|
|000041d0| a5 54 87 22 20 5b 77 69 | 6e 64 6f 77 2d 68 65 69 |.T." [wi|ndow-hei|
|000041e0| 67 68 74 20 73 65 6c 65 | 63 74 65 64 2d 77 69 6e |ght sele|cted-win|
|000041f0| 64 6f 77 20 67 6f 6d 6f | 6b 75 2d 79 2d 6f 66 66 |dow gomo|ku-y-off|
|00004200| 73 65 74 20 32 20 67 6f | 6d 6f 6b 75 2d 73 71 75 |set 2 go|moku-squ|
|00004210| 61 72 65 2d 68 65 69 67 | 68 74 5d 20 32 20 28 23 |are-heig|ht] 2 (#|
|00004220| 24 20 2e 20 31 36 37 34 | 34 29 5d 29 0a 23 40 37 |$ . 1674|4)]).#@7|
|00004230| 37 20 52 65 74 75 72 6e | 20 74 68 65 20 62 6f 61 |7 Return| the boa|
|00004240| 72 64 20 63 6f 6c 75 6d | 6e 20 77 68 65 72 65 20 |rd colum|n where |
|00004250| 70 6f 69 6e 74 20 69 73 | 2c 20 6f 72 20 6e 69 6c |point is|, or nil|
|00004260| 20 69 66 20 69 74 20 69 | 73 20 6e 6f 74 20 61 20 | if it i|s not a |
|00004270| 62 6f 61 72 64 20 63 6f | 6c 75 6d 6e 2e 1f 0a 28 |board co|lumn...(|
|00004280| 64 65 66 61 6c 69 61 73 | 20 27 67 6f 6d 6f 6b 75 |defalias| 'gomoku|
|00004290| 2d 70 6f 69 6e 74 2d 78 | 20 23 5b 6e 69 6c 20 22 |-point-x| #[nil "|
|000042a0| 69 08 5a 89 19 c2 59 ad | 92 09 0b a6 c2 55 ad 8b |i.Z...Y.|.....U..|
|000042b0| 09 0b a5 54 89 11 0c 58 | ad 81 09 29 87 22 20 5b |...T...X|...)." [|
|000042c0| 67 6f 6d 6f 6b 75 2d 78 | 2d 6f 66 66 73 65 74 20 |gomoku-x|-offset |
|000042d0| 63 6f 6c 20 30 20 67 6f | 6d 6f 6b 75 2d 73 71 75 |col 0 go|moku-squ|
|000042e0| 61 72 65 2d 77 69 64 74 | 68 20 67 6f 6d 6f 6b 75 |are-widt|h gomoku|
|000042f0| 2d 62 6f 61 72 64 2d 77 | 69 64 74 68 5d 20 33 20 |-board-w|idth] 3 |
|00004300| 28 23 24 20 2e 20 31 36 | 39 34 36 29 5d 29 0a 23 |(#$ . 16|946)]).#|
|00004310| 40 37 31 20 52 65 74 75 | 72 6e 20 74 68 65 20 62 |@71 Retu|rn the b|
|00004320| 6f 61 72 64 20 72 6f 77 | 20 77 68 65 72 65 20 70 |oard row| where p|
|00004330| 6f 69 6e 74 20 69 73 2c | 20 6f 72 20 6e 69 6c 20 |oint is,| or nil |
|00004340| 69 66 20 69 74 20 69 73 | 20 6e 6f 74 20 61 20 62 |if it is| not a b|
|00004350| 6f 61 72 64 20 72 6f 77 | 2e 1f 0a 28 64 65 66 61 |oard row|...(defa|
|00004360| 6c 69 61 73 20 27 67 6f | 6d 6f 6b 75 2d 70 6f 69 |lias 'go|moku-poi|
|00004370| 6e 74 2d 79 20 23 5b 6e | 69 6c 20 22 c0 c1 60 5c |nt-y #[n|il "..`\|
|00004380| 22 5c 6e 5a c1 5a 89 1b | c4 59 ad 93 0b 0d a6 c4 |"\nZ.Z..|.Y......|
|00004390| 55 ad 8c 0b 0d a5 54 89 | 13 0e 06 58 ad 81 0b 29 |U.....T.|...X...)|
|000043a0| 87 22 20 5b 63 6f 75 6e | 74 2d 6c 69 6e 65 73 20 |." [coun|t-lines |
|000043b0| 31 20 67 6f 6d 6f 6b 75 | 2d 79 2d 6f 66 66 73 65 |1 gomoku|-y-offse|
|000043c0| 74 20 72 6f 77 20 30 20 | 67 6f 6d 6f 6b 75 2d 73 |t row 0 |gomoku-s|
|000043d0| 71 75 61 72 65 2d 68 65 | 69 67 68 74 20 67 6f 6d |quare-he|ight gom|
|000043e0| 6f 6b 75 2d 62 6f 61 72 | 64 2d 68 65 69 67 68 74 |oku-boar|d-height|
|000043f0| 5d 20 34 20 28 23 24 20 | 2e 20 31 37 31 37 32 29 |] 4 (#$ |. 17172)|
|00004400| 5d 29 0a 23 40 37 33 20 | 52 65 74 75 72 6e 20 74 |]).#@73 |Return t|
|00004410| 68 65 20 69 6e 64 65 78 | 20 6f 66 20 74 68 65 20 |he index| of the |
|00004420| 73 71 75 61 72 65 20 70 | 6f 69 6e 74 20 69 73 20 |square p|oint is |
|00004430| 6f 6e 2c 20 6f 72 20 6e | 69 6c 20 69 66 20 6e 6f |on, or n|il if no|
|00004440| 74 20 6f 6e 20 74 68 65 | 20 62 6f 61 72 64 2e 1f |t on the| board..|
|00004450| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 67 6f 6d 6f |.(defali|as 'gomo|
|00004460| 6b 75 2d 70 6f 69 6e 74 | 2d 73 71 75 61 72 65 20 |ku-point|-square |
|00004470| 23 5b 6e 69 6c 20 22 c0 | 89 19 1a c3 20 89 12 ad |#[nil ".|.... ...|
|00004480| 8a c4 20 89 11 ad 84 c5 | 5c 6e 09 5c 22 2a 87 22 |.. .....|\n.\"*."|
|00004490| 20 5b 6e 69 6c 20 79 20 | 78 20 67 6f 6d 6f 6b 75 | [nil y |x gomoku|
|000044a0| 2d 70 6f 69 6e 74 2d 78 | 20 67 6f 6d 6f 6b 75 2d |-point-x| gomoku-|
|000044b0| 70 6f 69 6e 74 2d 79 20 | 67 6f 6d 6f 6b 75 2d 78 |point-y |gomoku-x|
|000044c0| 79 2d 74 6f 2d 69 6e 64 | 65 78 5d 20 33 20 28 23 |y-to-ind|ex] 3 (#|
|000044d0| 24 20 2e 20 31 37 34 31 | 36 29 5d 29 0a 23 40 33 |$ . 1741|6)]).#@3|
|000044e0| 36 20 4d 6f 76 65 20 70 | 6f 69 6e 74 20 74 6f 20 |6 Move p|oint to |
|000044f0| 73 71 75 61 72 65 20 6e | 75 6d 62 65 72 20 49 4e |square n|umber IN|
|00004500| 44 45 58 2e 1f 0a 28 64 | 65 66 61 6c 69 61 73 20 |DEX...(d|efalias |
|00004510| 27 67 6f 6d 6f 6b 75 2d | 67 6f 74 6f 2d 73 71 75 |'gomoku-|goto-squ|
|00004520| 61 72 65 20 23 5b 28 69 | 6e 64 65 78 29 20 22 c0 |are #[(i|ndex) ".|
|00004530| c1 5c 6e 21 c3 5c 6e 21 | 5c 22 87 22 20 5b 67 6f |.\n!.\n!|\"." [go|
|00004540| 6d 6f 6b 75 2d 67 6f 74 | 6f 2d 78 79 20 67 6f 6d |moku-got|o-xy gom|
|00004550| 6f 6b 75 2d 69 6e 64 65 | 78 2d 74 6f 2d 78 20 69 |oku-inde|x-to-x i|
|00004560| 6e 64 65 78 20 67 6f 6d | 6f 6b 75 2d 69 6e 64 65 |ndex gom|oku-inde|
|00004570| 78 2d 74 6f 2d 79 5d 20 | 34 20 28 23 24 20 2e 20 |x-to-y] |4 (#$ . |
|00004580| 31 37 36 33 34 29 5d 29 | 0a 23 40 33 38 20 4d 6f |17634)])|.#@38 Mo|
|00004590| 76 65 20 70 6f 69 6e 74 | 20 74 6f 20 73 71 75 61 |ve point| to squa|
|000045a0| 72 65 20 61 74 20 58 2c | 20 59 20 63 6f 6f 72 64 |re at X,| Y coord|
|000045b0| 73 2e 1f 0a 28 64 65 66 | 61 6c 69 61 73 20 27 67 |s...(def|alias 'g|
|000045c0| 6f 6d 6f 6b 75 2d 67 6f | 74 6f 2d 78 79 20 23 5b |omoku-go|to-xy #[|
|000045d0| 28 78 20 79 29 20 22 c0 | 09 5c 6e 0b 53 5f 5c 5c |(x y) ".|.\n.S_\\|
|000045e0| c4 5c 5c 21 88 c5 0e 06 | 0e 07 0e 08 53 5f 5c 5c |.\\!....|....S_\\|
|000045f0| 21 87 22 20 5b 67 6f 74 | 6f 2d 6c 69 6e 65 20 67 |!." [got|o-line g|
|00004600| 6f 6d 6f 6b 75 2d 79 2d | 6f 66 66 73 65 74 20 67 |omoku-y-|offset g|
|00004610| 6f 6d 6f 6b 75 2d 73 71 | 75 61 72 65 2d 68 65 69 |omoku-sq|uare-hei|
|00004620| 67 68 74 20 79 20 31 20 | 6d 6f 76 65 2d 74 6f 2d |ght y 1 |move-to-|
|00004630| 63 6f 6c 75 6d 6e 20 67 | 6f 6d 6f 6b 75 2d 78 2d |column g|omoku-x-|
|00004640| 6f 66 66 73 65 74 20 67 | 6f 6d 6f 6b 75 2d 73 71 |offset g|omoku-sq|
|00004650| 75 61 72 65 2d 77 69 64 | 74 68 20 78 5d 20 34 20 |uare-wid|th x] 4 |
|00004660| 28 23 24 20 2e 20 31 37 | 38 30 36 29 5d 29 0a 23 |(#$ . 17|806)]).#|
|00004670| 40 37 33 20 44 72 61 77 | 20 27 58 27 2c 20 27 4f |@73 Draw| 'X', 'O|
|00004680| 27 20 6f 72 20 27 2e 27 | 20 6f 6e 20 53 51 55 41 |' or '.'| on SQUA|
|00004690| 52 45 20 28 64 65 70 65 | 6e 64 69 6e 67 20 6f 6e |RE (depe|nding on|
|000046a0| 20 56 41 4c 55 45 29 2c | 20 6c 65 61 76 65 20 70 | VALUE),| leave p|
|000046b0| 6f 69 6e 74 20 74 68 65 | 72 65 2e 1f 0a 28 64 65 |oint the|re...(de|
|000046c0| 66 61 6c 69 61 73 20 27 | 67 6f 6d 6f 6b 75 2d 70 |falias '|gomoku-p|
|000046d0| 6c 6f 74 2d 73 71 75 61 | 72 65 20 23 5b 28 73 71 |lot-squa|re #[(sq|
|000046e0| 75 61 72 65 20 76 61 6c | 75 65 29 20 22 c0 09 21 |uare val|ue) "..!|
|000046f0| 88 c2 0b c4 55 ab 83 c5 | aa 89 0b c6 55 ab 83 c7 |....U...|....U...|
|00004700| aa 81 c8 21 88 c9 ca 21 | 87 22 20 5b 67 6f 6d 6f |...!...!|." [gomo|
|00004710| 6b 75 2d 67 6f 74 6f 2d | 73 71 75 61 72 65 20 73 |ku-goto-|square s|
|00004720| 71 75 61 72 65 20 67 6f | 6d 6f 6b 75 2d 70 75 74 |quare go|moku-put|
|00004730| 2d 63 68 61 72 20 76 61 | 6c 75 65 20 31 20 3f 58 |-char va|lue 1 ?X|
|00004740| 20 36 20 3f 4f 20 3f 5c | 2e 20 73 69 74 2d 66 6f | 6 ?O ?\|. sit-fo|
|00004750| 72 20 30 5d 20 33 20 28 | 23 24 20 2e 20 31 38 30 |r 0] 3 (|#$ . 180|
|00004760| 33 36 29 5d 29 0a 23 40 | 33 33 20 44 72 61 77 20 |36)]).#@|33 Draw |
|00004770| 43 48 41 52 20 6f 6e 20 | 74 68 65 20 47 6f 6d 6f |CHAR on |the Gomo|
|00004780| 6b 75 20 73 63 72 65 65 | 6e 2e 1f 0a 28 64 65 66 |ku scree|n...(def|
|00004790| 61 6c 69 61 73 20 27 67 | 6f 6d 6f 6b 75 2d 70 75 |alias 'g|omoku-pu|
|000047a0| 74 2d 63 68 61 72 20 23 | 5b 28 63 68 61 72 29 20 |t-char #|[(char) |
|000047b0| 22 c0 19 5c 6e 63 88 c3 | c4 21 88 c5 c4 21 29 87 |"..\nc..|.!...!).|
|000047c0| 22 20 5b 74 20 69 6e 68 | 69 62 69 74 2d 72 65 61 |" [t inh|ibit-rea|
|000047d0| 64 2d 6f 6e 6c 79 20 63 | 68 61 72 20 64 65 6c 65 |d-only c|har dele|
|000047e0| 74 65 2d 63 68 61 72 20 | 31 20 62 61 63 6b 77 61 |te-char |1 backwa|
|000047f0| 72 64 2d 63 68 61 72 5d | 20 32 20 28 23 24 20 2e |rd-char]| 2 (#$ .|
|00004800| 20 31 38 32 38 33 29 5d | 29 0a 23 40 33 33 20 44 | 18283)]|).#@33 D|
|00004810| 69 73 70 6c 61 79 20 61 | 6e 20 4e 20 62 79 20 4d |isplay a|n N by M|
|00004820| 20 47 6f 6d 6f 6b 75 20 | 62 6f 61 72 64 2e 1f 0a | Gomoku |board...|
|00004830| 28 64 65 66 61 6c 69 61 | 73 20 27 67 6f 6d 6f 6b |(defalia|s 'gomok|
|00004840| 75 2d 69 6e 69 74 2d 64 | 69 73 70 6c 61 79 20 23 |u-init-d|isplay #|
|00004850| 5b 28 6e 20 6d 29 20 22 | c0 70 21 88 c1 1a c3 20 |[(n m) "|.p!.... |
|00004860| 88 c4 89 89 89 1d 1e 06 | 1e 07 1e 08 c9 0e 5c 6e |........|......\n|
|00004870| 53 cb 5c 22 cc 50 16 08 | cd ce cf 0e 10 53 0e 08 |S.\".P..|.....S..|
|00004880| 5c 22 5c 22 16 08 c9 0e | 11 cb 5c 22 cc 0e 08 d2 |\"\"....|..\"....|
|00004890| 52 16 08 c9 0e 11 0e 10 | 53 0e 5c 6e 5f 5c 5c d3 |R.......|S.\n_\\.|
|000048a0| 5c 5c cb 5c 22 89 16 07 | d2 50 16 07 cd ce cf 0e |\\.\"...|.P......|
|000048b0| 14 53 0e 07 5c 22 5c 22 | 89 16 06 0e 08 50 16 06 |.S..\"\"|.....P..|
|000048c0| cd ce cf 0e 15 53 0e 06 | 5c 22 5c 22 16 06 cd ce |.....S..|\"\"....|
|000048d0| cf 0e 16 0e 07 5c 22 5c | 22 89 15 0e 08 0e 06 b1 |.....\"\|".......|
|000048e0| 03 88 2c d7 0e 10 54 d8 | a5 0e 15 54 d8 a5 5c 22 |..,...T.|...T..\"|
|000048f0| 88 d9 da 21 29 87 22 20 | 5b 62 75 66 66 65 72 2d |...!)." |[buffer-|
|00004900| 64 69 73 61 62 6c 65 2d | 75 6e 64 6f 20 74 20 69 |disable-|undo t i|
|00004910| 6e 68 69 62 69 74 2d 72 | 65 61 64 2d 6f 6e 6c 79 |nhibit-r|ead-only|
|00004920| 20 65 72 61 73 65 2d 62 | 75 66 66 65 72 20 6e 69 | erase-b|uffer ni|
|00004930| 6c 20 73 74 72 69 6e 67 | 34 20 73 74 72 69 6e 67 |l string|4 string|
|00004940| 33 20 73 74 72 69 6e 67 | 32 20 73 74 72 69 6e 67 |3 string|2 string|
|00004950| 31 20 6d 61 6b 65 2d 73 | 74 72 69 6e 67 20 67 6f |1 make-s|tring go|
|00004960| 6d 6f 6b 75 2d 73 71 75 | 61 72 65 2d 77 69 64 74 |moku-squ|are-widt|
|00004970| 68 20 3f 5c 20 20 22 2e | 22 20 61 70 70 6c 79 20 |h ?\ ".|" apply |
|00004980| 63 6f 6e 63 61 74 20 6d | 61 6b 65 2d 6c 69 73 74 |concat m|ake-list|
|00004990| 20 6e 20 67 6f 6d 6f 6b | 75 2d 78 2d 6f 66 66 73 | n gomok|u-x-offs|
|000049a0| 65 74 20 22 5c 6e 22 20 | 31 20 67 6f 6d 6f 6b 75 |et "\n" |1 gomoku|
|000049b0| 2d 73 71 75 61 72 65 2d | 68 65 69 67 68 74 20 6d |-square-|height m|
|000049c0| 20 67 6f 6d 6f 6b 75 2d | 79 2d 6f 66 66 73 65 74 | gomoku-|y-offset|
|000049d0| 20 67 6f 6d 6f 6b 75 2d | 67 6f 74 6f 2d 78 79 20 | gomoku-|goto-xy |
|000049e0| 32 20 73 69 74 2d 66 6f | 72 20 30 5d 20 36 20 28 |2 sit-fo|r 0] 6 (|
|000049f0| 23 24 20 2e 20 31 38 34 | 34 37 29 5d 29 0a 23 40 |#$ . 184|47)]).#@|
|00004a00| 37 32 20 4f 62 6e 6f 78 | 69 6f 75 73 6c 79 20 64 |72 Obnox|iously d|
|00004a10| 69 73 70 6c 61 79 20 73 | 6f 6d 65 20 73 74 61 74 |isplay s|ome stat|
|00004a20| 69 73 74 69 63 73 20 61 | 62 6f 75 74 20 70 72 65 |istics a|bout pre|
|00004a30| 76 69 6f 75 73 20 67 61 | 6d 65 73 20 69 6e 20 6d |vious ga|mes in m|
|00004a40| 6f 64 65 20 6c 69 6e 65 | 2e 1f 0a 28 64 65 66 61 |ode line|...(defa|
|00004a50| 6c 69 61 73 20 27 67 6f | 6d 6f 6b 75 2d 64 69 73 |lias 'go|moku-dis|
|00004a60| 70 6c 61 79 2d 73 74 61 | 74 69 73 74 69 63 73 20 |play-sta|tistics |
|00004a70| 23 5b 6e 69 6c 20 22 08 | c1 55 ac 88 c2 c3 0c 0d |#[nil ".|.U......|
|00004a80| 08 24 aa 85 c2 c6 0c 0d | 23 16 07 c8 20 87 22 20 |.$......|#... ." |
|00004a90| 5b 67 6f 6d 6f 6b 75 2d | 6e 75 6d 62 65 72 2d 6f |[gomoku-|number-o|
|00004aa0| 66 2d 64 72 61 77 73 20 | 30 20 66 6f 72 6d 61 74 |f-draws |0 format|
|00004ab0| 20 22 3a 20 57 6f 6e 20 | 25 64 2c 20 6c 6f 73 74 | ": Won |%d, lost|
|00004ac0| 20 25 64 2c 20 64 72 65 | 77 20 25 64 22 20 67 6f | %d, dre|w %d" go|
|00004ad0| 6d 6f 6b 75 2d 6e 75 6d | 62 65 72 2d 6f 66 2d 68 |moku-num|ber-of-h|
|00004ae0| 75 6d 61 6e 2d 77 69 6e | 73 20 67 6f 6d 6f 6b 75 |uman-win|s gomoku|
|00004af0| 2d 6e 75 6d 62 65 72 2d | 6f 66 2d 65 6d 61 63 73 |-number-|of-emacs|
|00004b00| 2d 77 69 6e 73 20 22 3a | 20 57 6f 6e 20 25 64 2c |-wins ":| Won %d,|
|00004b10| 20 6c 6f 73 74 20 25 64 | 22 20 6d 6f 64 65 2d 6c | lost %d|" mode-l|
|00004b20| 69 6e 65 2d 70 72 6f 63 | 65 73 73 20 66 6f 72 63 |ine-proc|ess forc|
|00004b30| 65 2d 6d 6f 64 65 2d 6c | 69 6e 65 2d 75 70 64 61 |e-mode-l|ine-upda|
|00004b40| 74 65 5d 20 35 20 28 23 | 24 20 2e 20 31 38 39 34 |te] 5 (#|$ . 1894|
|00004b50| 37 29 5d 29 0a 23 40 35 | 31 20 46 69 6e 64 20 6f |7)]).#@5|1 Find o|
|00004b60| 72 20 63 72 65 61 74 65 | 20 74 68 65 20 47 6f 6d |r create| the Gom|
|00004b70| 6f 6b 75 20 62 75 66 66 | 65 72 2c 20 61 6e 64 20 |oku buff|er, and |
|00004b80| 64 69 73 70 6c 61 79 20 | 69 74 2e 1f 0a 28 64 65 |display |it...(de|
|00004b90| 66 61 6c 69 61 73 20 27 | 67 6f 6d 6f 6b 75 2d 73 |falias '|gomoku-s|
|00004ba0| 77 69 74 63 68 2d 74 6f | 2d 77 69 6e 64 6f 77 20 |witch-to|-window |
|00004bb0| 23 5b 6e 69 6c 20 22 c0 | c1 21 89 1a ab 85 c3 5c |#[nil ".|.!.....\|
|00004bc0| 6e 21 aa 8c 0c ab 83 c5 | 20 88 c3 c1 21 88 c6 20 |n!......| ...!.. |
|00004bd0| 29 87 22 20 5b 67 65 74 | 2d 62 75 66 66 65 72 20 |)." [get|-buffer |
|00004be0| 22 2a 47 6f 6d 6f 6b 75 | 2a 22 20 62 75 66 66 20 |"*Gomoku|*" buff |
|00004bf0| 73 77 69 74 63 68 2d 74 | 6f 2d 62 75 66 66 65 72 |switch-t|o-buffer|
|00004c00| 20 67 6f 6d 6f 6b 75 2d | 67 61 6d 65 2d 69 6e 2d | gomoku-|game-in-|
|00004c10| 70 72 6f 67 72 65 73 73 | 20 67 6f 6d 6f 6b 75 2d |progress| gomoku-|
|00004c20| 63 72 61 73 68 2d 67 61 | 6d 65 20 67 6f 6d 6f 6b |crash-ga|me gomok|
|00004c30| 75 2d 6d 6f 64 65 5d 20 | 33 20 28 23 24 20 2e 20 |u-mode] |3 (#$ . |
|00004c40| 31 39 32 39 30 29 20 6e | 69 6c 5d 29 0a 23 40 33 |19290) n|il]).#@3|
|00004c50| 37 20 46 69 72 73 74 20 | 73 71 75 61 72 65 20 6f |7 First |square o|
|00004c60| 66 20 74 68 65 20 77 69 | 6e 6e 69 6e 67 20 71 74 |f the wi|nning qt|
|00004c70| 75 70 6c 65 2e 1f 0a 28 | 64 65 66 76 61 72 20 67 |uple...(|defvar g|
|00004c80| 6f 6d 6f 6b 75 2d 77 69 | 6e 6e 69 6e 67 2d 71 74 |omoku-wi|nning-qt|
|00004c90| 75 70 6c 65 2d 62 65 67 | 20 6e 69 6c 20 28 23 24 |uple-beg| nil (#$|
|00004ca0| 20 2e 20 31 39 35 33 38 | 29 29 0a 23 40 33 36 20 | . 19538|)).#@36 |
|00004cb0| 4c 61 73 74 20 73 71 75 | 61 72 65 20 6f 66 20 74 |Last squ|are of t|
|00004cc0| 68 65 20 77 69 6e 6e 69 | 6e 67 20 71 74 75 70 6c |he winni|ng qtupl|
|00004cd0| 65 2e 1f 0a 28 64 65 66 | 76 61 72 20 67 6f 6d 6f |e...(def|var gomo|
|00004ce0| 6b 75 2d 77 69 6e 6e 69 | 6e 67 2d 71 74 75 70 6c |ku-winni|ng-qtupl|
|00004cf0| 65 2d 65 6e 64 20 6e 69 | 6c 20 28 23 24 20 2e 20 |e-end ni|l (#$ . |
|00004d00| 31 39 36 33 32 29 29 0a | 23 40 35 33 20 44 69 72 |19632)).|#@53 Dir|
|00004d10| 65 63 74 69 6f 6e 20 6f | 66 20 74 68 65 20 77 69 |ection o|f the wi|
|00004d20| 6e 6e 69 6e 67 20 71 74 | 75 70 6c 65 20 28 61 6c |nning qt|uple (al|
|00004d30| 6f 6e 67 20 74 68 65 20 | 58 20 61 78 69 73 29 2e |ong the |X axis).|
|00004d40| 1f 0a 28 64 65 66 76 61 | 72 20 67 6f 6d 6f 6b 75 |..(defva|r gomoku|
|00004d50| 2d 77 69 6e 6e 69 6e 67 | 2d 71 74 75 70 6c 65 2d |-winning|-qtuple-|
|00004d60| 64 78 20 6e 69 6c 20 28 | 23 24 20 2e 20 31 39 37 |dx nil (|#$ . 197|
|00004d70| 32 35 29 29 0a 23 40 35 | 33 20 44 69 72 65 63 74 |25)).#@5|3 Direct|
|00004d80| 69 6f 6e 20 6f 66 20 74 | 68 65 20 77 69 6e 6e 69 |ion of t|he winni|
|00004d90| 6e 67 20 71 74 75 70 6c | 65 20 28 61 6c 6f 6e 67 |ng qtupl|e (along|
|00004da0| 20 74 68 65 20 59 20 61 | 78 69 73 29 2e 1f 0a 28 | the Y a|xis)...(|
|00004db0| 64 65 66 76 61 72 20 67 | 6f 6d 6f 6b 75 2d 77 69 |defvar g|omoku-wi|
|00004dc0| 6e 6e 69 6e 67 2d 71 74 | 75 70 6c 65 2d 64 79 20 |nning-qt|uple-dy |
|00004dd0| 6e 69 6c 20 28 23 24 20 | 2e 20 31 39 38 33 34 29 |nil (#$ |. 19834)|
|00004de0| 29 0a 23 40 36 30 20 52 | 65 74 75 72 6e 20 54 20 |).#@60 R|eturn T |
|00004df0| 69 66 20 53 51 55 41 52 | 45 20 62 65 6c 6f 6e 67 |if SQUAR|E belong|
|00004e00| 73 20 74 6f 20 61 20 71 | 74 75 70 6c 65 20 66 69 |s to a q|tuple fi|
|00004e10| 6c 6c 65 64 20 77 69 74 | 68 20 56 41 4c 55 45 73 |lled wit|h VALUEs|
|00004e20| 2e 1f 0a 28 64 65 66 61 | 6c 69 61 73 20 27 67 6f |...(defa|lias 'go|
|00004e30| 6d 6f 6b 75 2d 66 69 6e | 64 2d 66 69 6c 6c 65 64 |moku-fin|d-filled|
|00004e40| 2d 71 74 75 70 6c 65 20 | 23 5b 28 73 71 75 61 72 |-qtuple |#[(squar|
|00004e50| 65 20 76 61 6c 75 65 29 | 20 22 c0 09 5c 6e c3 c4 |e value)| "..\n..|
|00004e60| 24 ae 96 c0 09 5c 6e c4 | c3 24 ae 8e c0 09 5c 6e |$....\n.|.$....\n|
|00004e70| c3 89 24 ae 86 c0 09 5c | 6e c5 c3 24 87 22 20 5b |..$....\|n..$." [|
|00004e80| 67 6f 6d 6f 6b 75 2d 63 | 68 65 63 6b 2d 66 69 6c |gomoku-c|heck-fil|
|00004e90| 6c 65 64 2d 71 74 75 70 | 6c 65 20 73 71 75 61 72 |led-qtup|le squar|
|00004ea0| 65 20 76 61 6c 75 65 20 | 31 20 30 20 2d 31 5d 20 |e value |1 0 -1] |
|00004eb0| 35 20 28 23 24 20 2e 20 | 31 39 39 34 33 29 5d 29 |5 (#$ . |19943)])|
|00004ec0| 0a 23 40 37 34 20 52 65 | 74 75 72 6e 20 54 20 69 |.#@74 Re|turn T i|
|00004ed0| 66 20 53 51 55 41 52 45 | 20 62 65 6c 6f 6e 67 73 |f SQUARE| belongs|
|00004ee0| 20 74 6f 20 61 20 71 74 | 75 70 6c 65 20 66 69 6c | to a qt|uple fil|
|00004ef0| 6c 65 64 20 20 77 69 74 | 68 20 56 41 4c 55 45 73 |led wit|h VALUEs|
|00004f00| 20 61 6c 6f 6e 67 20 44 | 58 2c 20 44 59 2e 1f 0a | along D|X, DY...|
|00004f10| 28 64 65 66 61 6c 69 61 | 73 20 27 67 6f 6d 6f 6b |(defalia|s 'gomok|
|00004f20| 75 2d 63 68 65 63 6b 2d | 66 69 6c 6c 65 64 2d 71 |u-check-|filled-q|
|00004f30| 74 75 70 6c 65 20 23 5b | 28 73 71 75 61 72 65 20 |tuple #[|(square |
|00004f40| 76 61 6c 75 65 20 64 78 | 20 64 79 29 20 22 c0 89 |value dx| dy) "..|
|00004f50| 09 89 c2 0b 0c 5c 22 c5 | 1e 06 1e 07 1e 08 1e 09 |.....\".|........|
|00004f60| 1e 5c 6e 89 1e 0b cc 56 | ab 98 0e 0d 0e 0e 0e 09 |.\n....V|........|
|00004f70| 0e 07 5a 89 16 09 48 55 | ab 88 0e 0b 53 89 16 0b |..Z...HU|....S...|
|00004f80| aa 64 0e 0b cf 5c 5c 16 | 06 0e 5c 6e 0e 06 57 ab |.d...\\.|..\n..W.|
|00004f90| 98 0e 0d 0e 0e 0e 08 0e | 07 5c 5c 89 16 08 48 55 |........|.\\...HU|
|00004fa0| ab 88 0e 5c 6e 54 89 16 | 5c 6e aa 63 0e 5c 6e 0e |...\nT..|\n.c.\n.|
|00004fb0| 06 55 ad 99 09 0e 0b 0e | 07 5f 5c 5c 16 10 09 0e |.U......|._\\....|
|00004fc0| 5c 6e 0e 07 5f 5c 5c 16 | 11 0b 16 12 0c 16 13 d4 |\n.._\\.|........|
|00004fd0| 2e 06 87 22 20 5b 30 20 | 73 71 75 61 72 65 20 67 |..." [0 |square g|
|00004fe0| 6f 6d 6f 6b 75 2d 78 79 | 2d 74 6f 2d 69 6e 64 65 |omoku-xy|-to-inde|
|00004ff0| 78 20 64 78 20 64 79 20 | 6e 69 6c 20 61 2b 34 20 |x dx dy |nil a+4 |
|00005000| 64 65 70 6c 20 72 69 67 | 68 74 20 6c 65 66 74 20 |depl rig|ht left |
|00005010| 62 20 61 20 2d 34 20 76 | 61 6c 75 65 20 67 6f 6d |b a -4 v|alue gom|
|00005020| 6f 6b 75 2d 62 6f 61 72 | 64 20 34 20 67 6f 6d 6f |oku-boar|d 4 gomo|
|00005030| 6b 75 2d 77 69 6e 6e 69 | 6e 67 2d 71 74 75 70 6c |ku-winni|ng-qtupl|
|00005040| 65 2d 62 65 67 20 67 6f | 6d 6f 6b 75 2d 77 69 6e |e-beg go|moku-win|
|00005050| 6e 69 6e 67 2d 71 74 75 | 70 6c 65 2d 65 6e 64 20 |ning-qtu|ple-end |
|00005060| 67 6f 6d 6f 6b 75 2d 77 | 69 6e 6e 69 6e 67 2d 71 |gomoku-w|inning-q|
|00005070| 74 75 70 6c 65 2d 64 78 | 20 67 6f 6d 6f 6b 75 2d |tuple-dx| gomoku-|
|00005080| 77 69 6e 6e 69 6e 67 2d | 71 74 75 70 6c 65 2d 64 |winning-|qtuple-d|
|00005090| 79 20 74 5d 20 38 20 28 | 23 24 20 2e 20 32 30 31 |y t] 8 (|#$ . 201|
|000050a0| 36 36 29 5d 29 0a 23 40 | 36 34 20 43 72 6f 73 73 |66)]).#@|64 Cross|
|000050b0| 20 77 69 6e 6e 69 6e 67 | 20 71 74 75 70 6c 65 2c | winning| qtuple,|
|000050c0| 20 61 73 20 66 6f 75 6e | 64 20 62 79 20 60 67 6f | as foun|d by `go|
|000050d0| 6d 6f 6b 75 2d 66 69 6e | 64 2d 66 69 6c 6c 65 64 |moku-fin|d-filled|
|000050e0| 2d 71 74 75 70 6c 65 27 | 2e 1f 0a 28 64 65 66 61 |-qtuple'|...(defa|
|000050f0| 6c 69 61 73 20 27 67 6f | 6d 6f 6b 75 2d 63 72 6f |lias 'go|moku-cro|
|00005100| 73 73 2d 77 69 6e 6e 69 | 6e 67 2d 71 74 75 70 6c |ss-winni|ng-qtupl|
|00005110| 65 20 23 5b 6e 69 6c 20 | 22 c0 09 5c 6e 0b 0c 24 |e #[nil |"..\n..$|
|00005120| 87 22 20 5b 67 6f 6d 6f | 6b 75 2d 63 72 6f 73 73 |." [gomo|ku-cross|
|00005130| 2d 71 74 75 70 6c 65 20 | 67 6f 6d 6f 6b 75 2d 77 |-qtuple |gomoku-w|
|00005140| 69 6e 6e 69 6e 67 2d 71 | 74 75 70 6c 65 2d 62 65 |inning-q|tuple-be|
|00005150| 67 20 67 6f 6d 6f 6b 75 | 2d 77 69 6e 6e 69 6e 67 |g gomoku|-winning|
|00005160| 2d 71 74 75 70 6c 65 2d | 65 6e 64 20 67 6f 6d 6f |-qtuple-|end gomo|
|00005170| 6b 75 2d 77 69 6e 6e 69 | 6e 67 2d 71 74 75 70 6c |ku-winni|ng-qtupl|
|00005180| 65 2d 64 78 20 67 6f 6d | 6f 6b 75 2d 77 69 6e 6e |e-dx gom|oku-winn|
|00005190| 69 6e 67 2d 71 74 75 70 | 6c 65 2d 64 79 5d 20 35 |ing-qtup|le-dy] 5|
|000051a0| 20 28 23 24 20 2e 20 32 | 30 36 35 31 29 5d 29 0a | (#$ . 2|0651)]).|
|000051b0| 23 40 37 33 20 43 72 6f | 73 73 20 65 76 65 72 79 |#@73 Cro|ss every|
|000051c0| 20 73 71 75 61 72 65 20 | 62 65 74 77 65 65 6e 20 | square |between |
|000051d0| 53 51 55 41 52 45 31 20 | 61 6e 64 20 53 51 55 41 |SQUARE1 |and SQUA|
|000051e0| 52 45 32 20 69 6e 20 74 | 68 65 20 44 58 2c 20 44 |RE2 in t|he DX, D|
|000051f0| 59 20 64 69 72 65 63 74 | 69 6f 6e 2e 1f 0a 28 64 |Y direct|ion...(d|
|00005200| 65 66 61 6c 69 61 73 20 | 27 67 6f 6d 6f 6b 75 2d |efalias |'gomoku-|
|00005210| 63 72 6f 73 73 2d 71 74 | 75 70 6c 65 20 23 5b 28 |cross-qt|uple #[(|
|00005220| 73 71 75 61 72 65 31 20 | 73 71 75 61 72 65 32 20 |square1 |square2 |
|00005230| 64 78 20 64 79 29 20 22 | 8a c0 09 5c 6e 5c 22 1b |dx dy) "|...\n\".|
|00005240| 0c 0d 55 84 9c 00 c6 0c | 21 88 0c 0b 5c 5c 14 09 |..U.....|!...\\..|
|00005250| c7 55 ab a0 5c 6e c8 55 | ab 9b c7 1e 09 0e 09 0e |.U..\n.U|........|
|00005260| 5c 6e 57 ab 8e 0e 09 54 | 16 09 c7 75 88 cb cc 21 |\nW....T|...u...!|
|00005270| 88 aa 6b 29 aa 4d 09 c8 | 55 ab a1 5c 6e c7 55 ab |..k).M..|U..\n.U.|
|00005280| 9c c7 1e 09 0e 09 0e 0d | 57 ab 8f 0e 09 54 16 09 |........|W....T..|
|00005290| ce c7 21 88 cb cf 21 88 | aa 6a 29 aa 27 09 d0 55 |..!...!.|.j).'..U|
|000052a0| ab 99 5c 6e c7 55 ab 94 | d1 0e 5c 6e d2 a5 21 88 |..\n.U..|..\n..!.|
|000052b0| ce 0e 0d d2 a5 21 88 cb | d3 21 88 aa 09 09 c7 55 |.....!..|.!.....U|
|000052c0| ab 04 5c 6e c7 55 83 06 | 00 0e 5c 6e d2 a5 75 88 |..\n.U..|..\n..u.|
|000052d0| ce 0e 0d d2 a5 21 88 cb | d4 21 88 82 06 00 2a d5 |.....!..|.!....*.|
|000052e0| c8 21 87 22 20 5b 67 6f | 6d 6f 6b 75 2d 78 79 2d |.!." [go|moku-xy-|
|000052f0| 74 6f 2d 69 6e 64 65 78 | 20 64 78 20 64 79 20 64 |to-index| dx dy d|
|00005300| 65 70 6c 20 73 71 75 61 | 72 65 31 20 73 71 75 61 |epl squa|re1 squa|
|00005310| 72 65 32 20 67 6f 6d 6f | 6b 75 2d 67 6f 74 6f 2d |re2 gomo|ku-goto-|
|00005320| 73 71 75 61 72 65 20 31 | 20 30 20 6e 20 67 6f 6d |square 1| 0 n gom|
|00005330| 6f 6b 75 2d 73 71 75 61 | 72 65 2d 77 69 64 74 68 |oku-squa|re-width|
|00005340| 20 67 6f 6d 6f 6b 75 2d | 70 75 74 2d 63 68 61 72 | gomoku-|put-char|
|00005350| 20 3f 5c 2d 20 67 6f 6d | 6f 6b 75 2d 73 71 75 61 | ?\- gom|oku-squa|
|00005360| 72 65 2d 68 65 69 67 68 | 74 20 6e 65 78 74 2d 6c |re-heigh|t next-l|
|00005370| 69 6e 65 20 3f 5c 7c 20 | 2d 31 20 62 61 63 6b 77 |ine ?\| |-1 backw|
|00005380| 61 72 64 2d 63 68 61 72 | 20 32 20 3f 5c 2f 20 3f |ard-char| 2 ?\/ ?|
|00005390| 5c 5c 20 73 69 74 2d 66 | 6f 72 5d 20 33 20 28 23 |\\ sit-f|or] 3 (#|
|000053a0| 24 20 2e 20 32 30 39 31 | 37 29 5d 29 0a 23 40 35 |$ . 2091|7)]).#@5|
|000053b0| 33 20 4d 6f 76 65 20 70 | 6f 69 6e 74 20 62 61 63 |3 Move p|oint bac|
|000053c0| 6b 77 61 72 64 20 6f 6e | 65 20 63 6f 6c 75 6d 6e |kward on|e column|
|000053d0| 20 6f 6e 20 74 68 65 20 | 47 6f 6d 6f 6b 75 20 62 | on the |Gomoku b|
|000053e0| 6f 61 72 64 2e 1f 0a 28 | 64 65 66 61 6c 69 61 73 |oard...(|defalias|
|000053f0| 20 27 67 6f 6d 6f 6b 75 | 2d 6d 6f 76 65 2d 6c 65 | 'gomoku|-move-le|
|00005400| 66 74 20 23 5b 6e 69 6c | 20 22 c0 20 19 c2 09 ac |ft #[nil| ". ....|
|00005410| 83 c3 aa 89 09 c3 56 ab | 83 0c aa 81 c5 21 29 87 |......V.|.....!).|
|00005420| 22 20 5b 67 6f 6d 6f 6b | 75 2d 70 6f 69 6e 74 2d |" [gomok|u-point-|
|00005430| 78 20 78 20 62 61 63 6b | 77 61 72 64 2d 63 68 61 |x x back|ward-cha|
|00005440| 72 20 31 20 67 6f 6d 6f | 6b 75 2d 73 71 75 61 72 |r 1 gomo|ku-squar|
|00005450| 65 2d 77 69 64 74 68 20 | 30 5d 20 33 20 28 23 24 |e-width |0] 3 (#$|
|00005460| 20 2e 20 32 31 34 32 36 | 29 20 6e 69 6c 5d 29 0a | . 21426|) nil]).|
|00005470| 23 40 35 32 20 4d 6f 76 | 65 20 70 6f 69 6e 74 20 |#@52 Mov|e point |
|00005480| 66 6f 72 77 61 72 64 20 | 6f 6e 65 20 63 6f 6c 75 |forward |one colu|
|00005490| 6d 6e 20 6f 6e 20 74 68 | 65 20 47 6f 6d 6f 6b 75 |mn on th|e Gomoku|
|000054a0| 20 62 6f 61 72 64 2e 1f | 0a 28 64 65 66 61 6c 69 | board..|.(defali|
|000054b0| 61 73 20 27 67 6f 6d 6f | 6b 75 2d 6d 6f 76 65 2d |as 'gomo|ku-move-|
|000054c0| 72 69 67 68 74 20 23 5b | 6e 69 6c 20 22 c0 20 89 |right #[|nil ". .|
|000054d0| 19 ac 83 c2 aa 89 09 0b | 57 ab 83 0c aa 81 c5 75 |........|W......u|
|000054e0| 29 87 22 20 5b 67 6f 6d | 6f 6b 75 2d 70 6f 69 6e |)." [gom|oku-poin|
|000054f0| 74 2d 78 20 78 20 31 20 | 67 6f 6d 6f 6b 75 2d 62 |t-x x 1 |gomoku-b|
|00005500| 6f 61 72 64 2d 77 69 64 | 74 68 20 67 6f 6d 6f 6b |oard-wid|th gomok|
|00005510| 75 2d 73 71 75 61 72 65 | 2d 77 69 64 74 68 20 30 |u-square|-width 0|
|00005520| 5d 20 33 20 28 23 24 20 | 2e 20 32 31 36 32 31 29 |] 3 (#$ |. 21621)|
|00005530| 20 6e 69 6c 5d 29 0a 23 | 40 34 36 20 4d 6f 76 65 | nil]).#|@46 Move|
|00005540| 20 70 6f 69 6e 74 20 64 | 6f 77 6e 20 6f 6e 65 20 | point d|own one |
|00005550| 72 6f 77 20 6f 6e 20 74 | 68 65 20 47 6f 6d 6f 6b |row on t|he Gomok|
|00005560| 75 20 62 6f 61 72 64 2e | 1f 0a 28 64 65 66 61 6c |u board.|..(defal|
|00005570| 69 61 73 20 27 67 6f 6d | 6f 6b 75 2d 6d 6f 76 65 |ias 'gom|oku-move|
|00005580| 2d 64 6f 77 6e 20 23 5b | 6e 69 6c 20 22 c0 20 19 |-down #[|nil ". .|
|00005590| c2 09 ac 83 c3 aa 89 09 | 0c 57 ab 83 0d aa 81 c6 |........|.W......|
|000055a0| 21 29 87 22 20 5b 67 6f | 6d 6f 6b 75 2d 70 6f 69 |!)." [go|moku-poi|
|000055b0| 6e 74 2d 79 20 79 20 6e | 65 78 74 2d 6c 69 6e 65 |nt-y y n|ext-line|
|000055c0| 20 31 20 67 6f 6d 6f 6b | 75 2d 62 6f 61 72 64 2d | 1 gomok|u-board-|
|000055d0| 68 65 69 67 68 74 20 67 | 6f 6d 6f 6b 75 2d 73 71 |height g|omoku-sq|
|000055e0| 75 61 72 65 2d 68 65 69 | 67 68 74 20 30 5d 20 33 |uare-hei|ght 0] 3|
|000055f0| 20 28 23 24 20 2e 20 32 | 31 38 32 30 29 20 6e 69 | (#$ . 2|1820) ni|
|00005600| 6c 5d 29 0a 23 40 34 34 | 20 4d 6f 76 65 20 70 6f |l]).#@44| Move po|
|00005610| 69 6e 74 20 75 70 20 6f | 6e 65 20 72 6f 77 20 6f |int up o|ne row o|
|00005620| 6e 20 74 68 65 20 47 6f | 6d 6f 6b 75 20 62 6f 61 |n the Go|moku boa|
|00005630| 72 64 2e 1f 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |rd...(de|falias '|
|00005640| 67 6f 6d 6f 6b 75 2d 6d | 6f 76 65 2d 75 70 20 23 |gomoku-m|ove-up #|
|00005650| 5b 6e 69 6c 20 22 c0 20 | 19 c2 09 ac 83 c3 aa 89 |[nil ". |........|
|00005660| 09 c3 56 ab 83 0c aa 81 | c5 21 29 87 22 20 5b 67 |..V.....|.!)." [g|
|00005670| 6f 6d 6f 6b 75 2d 70 6f | 69 6e 74 2d 79 20 79 20 |omoku-po|int-y y |
|00005680| 70 72 65 76 69 6f 75 73 | 2d 6c 69 6e 65 20 31 20 |previous|-line 1 |
|00005690| 67 6f 6d 6f 6b 75 2d 73 | 71 75 61 72 65 2d 68 65 |gomoku-s|quare-he|
|000056a0| 69 67 68 74 20 30 5d 20 | 33 20 28 23 24 20 2e 20 |ight 0] |3 (#$ . |
|000056b0| 32 32 30 32 35 29 20 6e | 69 6c 5d 29 0a 23 40 34 |22025) n|il]).#@4|
|000056c0| 34 20 4d 6f 76 65 20 70 | 6f 69 6e 74 20 4e 6f 72 |4 Move p|oint Nor|
|000056d0| 74 68 20 45 61 73 74 20 | 6f 6e 20 74 68 65 20 47 |th East |on the G|
|000056e0| 6f 6d 6f 6b 75 20 62 6f | 61 72 64 2e 1f 0a 28 64 |omoku bo|ard...(d|
|000056f0| 65 66 61 6c 69 61 73 20 | 27 67 6f 6d 6f 6b 75 2d |efalias |'gomoku-|
|00005700| 6d 6f 76 65 2d 6e 65 20 | 23 5b 6e 69 6c 20 22 c0 |move-ne |#[nil ".|
|00005710| 20 88 c1 20 87 22 20 5b | 67 6f 6d 6f 6b 75 2d 6d | .. ." [|gomoku-m|
|00005720| 6f 76 65 2d 75 70 20 67 | 6f 6d 6f 6b 75 2d 6d 6f |ove-up g|omoku-mo|
|00005730| 76 65 2d 72 69 67 68 74 | 5d 20 31 20 28 23 24 20 |ve-right|] 1 (#$ |
|00005740| 2e 20 32 32 32 31 30 29 | 20 6e 69 6c 5d 29 0a 23 |. 22210)| nil]).#|
|00005750| 40 34 34 20 4d 6f 76 65 | 20 70 6f 69 6e 74 20 53 |@44 Move| point S|
|00005760| 6f 75 74 68 20 45 61 73 | 74 20 6f 6e 20 74 68 65 |outh Eas|t on the|
|00005770| 20 47 6f 6d 6f 6b 75 20 | 62 6f 61 72 64 2e 1f 0a | Gomoku |board...|
|00005780| 28 64 65 66 61 6c 69 61 | 73 20 27 67 6f 6d 6f 6b |(defalia|s 'gomok|
|00005790| 75 2d 6d 6f 76 65 2d 73 | 65 20 23 5b 6e 69 6c 20 |u-move-s|e #[nil |
|000057a0| 22 c0 20 88 c1 20 87 22 | 20 5b 67 6f 6d 6f 6b 75 |". .. ."| [gomoku|
|000057b0| 2d 6d 6f 76 65 2d 64 6f | 77 6e 20 67 6f 6d 6f 6b |-move-do|wn gomok|
|000057c0| 75 2d 6d 6f 76 65 2d 72 | 69 67 68 74 5d 20 31 20 |u-move-r|ight] 1 |
|000057d0| 28 23 24 20 2e 20 32 32 | 33 35 36 29 20 6e 69 6c |(#$ . 22|356) nil|
|000057e0| 5d 29 0a 23 40 34 34 20 | 4d 6f 76 65 20 70 6f 69 |]).#@44 |Move poi|
|000057f0| 6e 74 20 4e 6f 72 74 68 | 20 57 65 73 74 20 6f 6e |nt North| West on|
|00005800| 20 74 68 65 20 47 6f 6d | 6f 6b 75 20 62 6f 61 72 | the Gom|oku boar|
|00005810| 64 2e 1f 0a 28 64 65 66 | 61 6c 69 61 73 20 27 67 |d...(def|alias 'g|
|00005820| 6f 6d 6f 6b 75 2d 6d 6f | 76 65 2d 6e 77 20 23 5b |omoku-mo|ve-nw #[|
|00005830| 6e 69 6c 20 22 c0 20 88 | c1 20 87 22 20 5b 67 6f |nil ". .|. ." [go|
|00005840| 6d 6f 6b 75 2d 6d 6f 76 | 65 2d 75 70 20 67 6f 6d |moku-mov|e-up gom|
|00005850| 6f 6b 75 2d 6d 6f 76 65 | 2d 6c 65 66 74 5d 20 31 |oku-move|-left] 1|
|00005860| 20 28 23 24 20 2e 20 32 | 32 35 30 34 29 20 6e 69 | (#$ . 2|2504) ni|
|00005870| 6c 5d 29 0a 23 40 34 34 | 20 4d 6f 76 65 20 70 6f |l]).#@44| Move po|
|00005880| 69 6e 74 20 53 6f 75 74 | 68 20 57 65 73 74 20 6f |int Sout|h West o|
|00005890| 6e 20 74 68 65 20 47 6f | 6d 6f 6b 75 20 62 6f 61 |n the Go|moku boa|
|000058a0| 72 64 2e 1f 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |rd...(de|falias '|
|000058b0| 67 6f 6d 6f 6b 75 2d 6d | 6f 76 65 2d 73 77 20 23 |gomoku-m|ove-sw #|
|000058c0| 5b 6e 69 6c 20 22 c0 20 | 88 c1 20 87 22 20 5b 67 |[nil ". |.. ." [g|
|000058d0| 6f 6d 6f 6b 75 2d 6d 6f | 76 65 2d 64 6f 77 6e 20 |omoku-mo|ve-down |
|000058e0| 67 6f 6d 6f 6b 75 2d 6d | 6f 76 65 2d 6c 65 66 74 |gomoku-m|ove-left|
|000058f0| 5d 20 31 20 28 23 24 20 | 2e 20 32 32 36 34 39 29 |] 1 (#$ |. 22649)|
|00005900| 20 6e 69 6c 5d 29 0a 28 | 70 72 6f 76 69 64 65 20 | nil]).(|provide |
|00005910| 27 67 6f 6d 6f 6b 75 29 | 0a |'gomoku)|. |
+--------+-------------------------+-------------------------+--------+--------+